Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(inspect-history): Refactor providers #1109

Merged

Conversation

christeefy
Copy link
Contributor

@christeefy christeefy commented Jun 4, 2024

A small PR to refactor redundant logic within the dspy.LM.inspect_history method.

I came across this when trying to integrate a custom LLM — inspect_history expects a particular schema from self.history[i]['requests'] that isn't documented in the docs. These if/else statements indicate a deficiency of the existing interface.

I'm happy to extend in the interface across all LM subclasses, cleaning up the if/else statement here and update the docs. However, I would first like to understand what is the concept of "choices" in printed.append("<prompt>", "<choices>"), and possibly some guidance on the proper interface if you have any.

Thanks!

Simplify branches
@okhat
Copy link
Collaborator

okhat commented Jun 11, 2024

Thank you. Yeah this is a mess right now and a deeper refactor is always welcome but do coordinate with the release candidate branch

@okhat okhat merged commit a009cfd into stanfordnlp:main Jun 11, 2024
4 checks passed
@christeefy christeefy deleted the refactor/response-and-choice-parsing branch June 11, 2024 17:51
@christeefy
Copy link
Contributor Author

Thanks @okhat. Where may I find the release candidate branch?

@tom-doerr
Copy link
Contributor

@christeefy The branch has the name rc. https://github.com/stanfordnlp/dspy/tree/rc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants