-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(dspy): extend incomplete generations #1613
base: main
Are you sure you want to change the base?
feat(dspy): extend incomplete generations #1613
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double check: this file is not being changed materially right? Just formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one change in this file - added a comment
demos=demos, | ||
inputs=inputs, | ||
_parse_values=_parse_values, | ||
max_extensions=dspy.settings.max_extensions or 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@okhat this is the only real change in this file - everything else is linting/formatting from rust
If the output parsed by
ChatAdapter.parse
does not include all the fields required by the signature, the lm will be called again up tomax_extensions
times, with the thus-far completed output added to the input fields for the next generation.Logic is wrapped up as a decorator to allow the logic to be reused by future
Adaper
s.Added tests for extended generation.
max_extensions
defaults to 1 to maintain current behaviour.Linting and formatting changes from ruff.