dspy
dspy copied to clipboard
feature: add dl.from_json to support native json dataset formats
from dspy.datasets import DataLoader
dl = DataLoader()
json_dataset = dl.from_json("/home/path-to/sample_responses.json", fields=["question", "answer", "context"])
# joy ensues...
LGTM
Thank you so much @poppingtonic ! @krypticmouse does this fit your idea of the loader? Feel free to merge if so!
Yes this is perfect :slightly_smiling_face: . Thanks for the contribution @poppingtonic!!
Merging it!