Closed Zephyruss1 closed 1 week ago
@ai-yann
Thanks for the detailed issue.
What notebook were you trying to run?
Is there a specific reason you're using LangChain for this? With the Cohere SDK (v2) it is a pleasant experience :)
We do support LangChain, but unless you're referencing a particular notebook, we should probably tackle that as an issue in langchain-ai/langchain-cohere. And if you go that route, feel free to post the issue link here as well, and I'll take a look in that context.
Other notes:
Hello @ai-yann,
I'm using jupyter notebook embeded in pycharm.
I will try Cohere SDK V2 thanks for recommendation. Also I'm posted this issue in langchain-cohere-issue
Thanks.
Moving this to langchain-cohere #105 since this is a LangChain-specific issue. I'll copy over the details there to help track and resolve this.
Issue Type
Bug Report
Notebook Name
No response
Description
I'm trying to run Cohere model=
command-r-plus
withwith_structed_output
on LangChain. But receiving errorUnprocessableEntityError: status_code: 422, body: data=None message='No valid tool call or response generated'
So I think problem is coming from
langchain_cohere.chat_models.ChatCohere --> def with_structured_output
I excepted to invoke message success.
Steps to Reproduce (for bugs)
No response
System Information
Additional Context
Code Snippet:
Output:
Traceback: