dspy
dspy copied to clipboard
Teleprompt Base Class -> ABC, Some Static Typing, and Ruff Fixes/Updates
Only clear dsp.setting.trace in assertions.py if a trace object exists.
Adapt YouRM API call signature to match the documentation on https://api.you.com/api-key; update return data to respect self.k (as opposed to returning all snippets from the first K hits).
It's be great if you add a you.com entry to this document? that will help others who want to use you.com If you prefer, a separate PR would work for sure.
@insop do you mean to the documentation? Sure, I can add that. Will get to it this evening.
Had less bandwidth than I anticipated, I plan to sit down and contribute a bunch come early March.
Tagging @arnavsinghvi11 for the issue above it comes up a lot: dsp.settings.trace being None by default causes issues. Is setting it globally to [] correct? Probably not? It affects optimization somewhere? Is there any code checking for dspy.settings.trace that assumes it None and [] are different?
dsp.settings.trace
Yeah I believe we should set it to [] going forward since there are checks in assertion.py. It seems that the optimizations logic also set trace = [] internally so I believe we can make this change globally in settings. Let me know if that aligns and I can push a PR for it.
dsp.settings.trace
Yeah I believe we should set it to [] going forward since there are checks in assertion.py. It seems that the optimizations logic also set trace = [] internally so I believe we can make this change globally in settings. Let me know if that aligns and I can push a PR for it.
Agree with @arnavsinghvi11, setting trace to [] by default looks good.