-
Notifications
You must be signed in to change notification settings - Fork 750
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: Implement structured output by using outlines #745
base: master
Are you sure you want to change the base?
Conversation
…ype in the token counter
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.
Thanks @Appointat! The core codebase LGTM. There are just some changes needed on the dependencies management though.
Besides, there are some errors raised when checking with mypy
on my side, maybe need some double checking on that,
def run( | ||
self, | ||
messages: List[OpenAIMessage], | ||
output_schema: Optional[Type[T]] = None, |
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.
why this is T not BaseModel, because our schema of output parse is baseModel type
This PR introduces structured output capabilities for both open-source and closed-source language models (LLMs) in our system:
Open-source LLMs:
Closed-source LLMs with function calling:
Key changes:
Testing:
Next steps: