Skip to content

AttributeError: 'ChatOpenAI' object has no attribute 'bind_tools' #18306

Closed Answered by dosubot bot
adream307 asked this question in Q&A
Discussion options

You must be logged in to vote

🤖

Hey @adream307, great to see you diving into the depths of LangChain again! 🌊

Based on the context provided, it seems like you're trying to use the bind_tools method with the ChatOpenAI class. However, as per the LangChain codebase and the issues found in the repository, there is no bind_tools method available in the ChatOpenAI class.

The bind_tools method is available in the ChatMistralAI class, which is a subclass of BaseChatModel. This method is designed to bind tool-like objects to the chat model, assuming the model is compatible with the OpenAI tool-calling API. You can find more details about this in the ChatMistralAI class definition in the LangChain codebase.

If you're trying to…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by adream307
Comment options

You must be logged in to vote
1 reply
@adream307
Comment options

Comment options

You must be logged in to vote
8 replies
@piotrekz79
Comment options

@piotrekz79
Comment options

@keurcien
Comment options

@AntarikshVerma
Comment options

@RajMaharajwala
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants