Closed Royal-lobster closed 2 months ago
It appears there's an issue with the ChatCohere.bind()
method not correctly passing the tools to the Cohere Client in LangChain.js. This problem might stem from a bug within the LangChain.js framework itself. To address this, you could try updating LangChain.js to the latest version, as sometimes these issues are resolved in newer releases.
Alternatively, consider directly passing the tools to the ChatCohere
constructor to see if it circumvents the issue:
const model = new ChatCohere({
temperature: 0,
model: "command-r-plus",
tools,
});
If the problem persists, I recommend filing a new issue in the LangChain.js repository with the details you've provided here. The maintainers could offer more specific guidance or identify if this is indeed a bug that needs fixing.
Hey, we don't have support for tool calling in the JS Cohere package yet. If you would like to make this contribution (we would really appreciate it!!) I can assign you to a new issue.
Hey, we don't have support for tool calling in the JS Cohere package yet. If you would like to make this contribution (we would really appreciate it!!) I can assign you to a new issue.
I see, I can work on this
Checked other resources
Example Code
Following the example from https://docs.cohere.com/docs/tool-use
Error Message and Stack Trace (if applicable)
No response
Description
ChatCohere
.bind()
method is not passing down tools (as per cohere docs) to Cohere ClientHere is the request that is getting sent from machine with the code attached
System Info
Platform: Mac OS Sonoma (Version 14.4.1 (23E224)) Node version: v18.17.0 yarn version: v1.22.22