-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(groq): Feature/groq response format improvements #6754
base: main
Are you sure you want to change the base?
fix(groq): Feature/groq response format improvements #6754
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Thanks, this looks good! BTW you should also be able to pass it in at runtime if you don't want to use await model.invoke(messages, { response_format: "json_object" }); |
"})\n", | ||
"\n", | ||
"// if you need a response format other than the default\n", | ||
"const llmWithResponseFormat = llm.bind({ response_format: \"json_object\" });" |
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.
Or wait, does this need to be response_format: { type: "json_object" }
? I think that's what OpenAI does
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.
Oh, yes, fixed in 7c6250a
20cda2c
to
5f0c6a7
Compare
I have added a Json invocation block with 2 ways to pass response_format here 5f0c6a7 |
This PR updates the langchain groq response_format type by replacing it with one from the groq-sdk and adds the example from #6708 to the documentation.