-
Notifications
You must be signed in to change notification settings - Fork 15.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
community: Outlines integration #27449
base: master
Are you sure you want to change the base?
Conversation
…n' into outlines-integration
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I'm surprised by this too -- the header is included for sure. |
Ah, I see. I believe the order of credentials and installation should be switched, as per this doc. |
I tried this and run the script locally but still didn't work ... |
Could y'all wait a bit before merging? I want some Outlines people from @dottxt-ai to take a look at this to see how we feel about the interface. |
Looks good to me 🫡 |
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 for the contribution -- looks good overall! Added a few comments
Could you add some unittests as well? |
I added unit-tests before but removed them because I could not find a useful way to do them without requiring network connection since outlines requires local models and you initialize the chat model with a hugging face model id. |
yea, you would probably need to do some mocking for the model interfaces to avoid network connections or using local models. primarily it would be nice to test different scenarios for constraints validation etc. you could also factor some of those out outside the classes and that would also make it easier to test |
✅ |
@shroominic thanks for adding the tests! i think it's almost ready to merge -- docs page for LLMs is failing (the chat model one is correct)
|
…n' into outlines-integration
everything passing 🙌 |
In collaboration with @rlouf I build an outlines integration for langchain!
I think this is really useful for doing any type of structured output locally.
Dottxt spend alot of work optimising this process at a lower level (outlines-core written in rust) so I think this is a better alternative over all current approaches in langchain to do structured output.
It also implements the
.with_structured_output
method so it should be a drop in replacement for a lot of applications.The integration includes:
Dependencies:
outlines
+ additional (depending on backend used)I am not sure if the unit-tests comply with all requirements, if not I suggest to just remove them since I don't see a useful way to do it differently.
Quick overview:
Chat Models:
Structured Output: