Relative Content

Tag Archive for pythonartificial-intelligencelangchainlarge-language-modelllama

How to implement bind_tools function in custom chat model

I am very new to langchain. I am trying to build a agent which uses a custom LLM (eg llama-3) and have tool calling capability. I have build my own CustomChatModel class which inherits from BaseChatModel class. I have implemented my own _generate() function. For the bind_tools() function i have taken the implmentation from one of the predifined chatModel for eg. ChatOpenAI().
But the i think it is not working. When asked about the current information it is not calling the tool.