You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @morigs 👋, I'm here to help you with any issues you're facing. I'm a bot designed to assist you in solving bugs, answering questions, and becoming a contributor.
The error you're encountering occurs because the ChatYandexGPT model does not implement the bindTools method, which is required by the createReactAgent function. This method is necessary for binding tools to the language model, allowing it to utilize them during its operation [1].
To resolve this issue, you need to ensure that the ChatYandexGPT model implements the bindTools method. If it doesn't, you can create a wrapper around the ChatYandexGPT model to add this functionality. Here's a basic example of how you might implement such a wrapper:
classChatYandexGPTWithToolsextendsChatYandexGPT{bindTools(tools){// Implement the logic to bind tools to the model// This might involve storing the tools and using them in the model's methodsthis.tools=tools;}}// Use the wrapped model with createReactAgentconstagent=createReactAgent({llm: newChatYandexGPTWithTools({temperature: 0}),tools: [],checkpointSaver: newMemorySaver(),});
This example assumes you have a way to integrate the tools into the model's operation. You will need to adapt the bindTools method to fit the specific requirements of your tools and how they should interact with the ChatYandexGPT model.
Yeah only certain providers support tool calling. It's a model-specific feature so I'm not sure there's much we can do about it as I don't have access to Yandex models.
YandexGPT supports function calling as for now.
So as far as I understand the issue is with the langchain adapter not binding tools to the YandexGPT API
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
When using
ChatYandexGPT
forcreateReactAgent
it throwsllm [object Object] must define bindTools method
System Info
Bun 1.1.43
The text was updated successfully, but these errors were encountered: