Open Harsh-Kesharwani opened 3 months ago
You can use OllamaFunctions
from langchain_experimental.llms.ollama_functions
@keenborder786 But i have to use function calling along with chat messages as open ai support in there API v1/completion.
nothing except for openai, mistral, google or others like that work. I tried with llama.cpp (original, python and server), ollama, kobold but now I am certain no opensource model or library works exactly like openai api.
I am afraid that is not possible because Function Calling
is a special capability offered only by OpenAI
But you can always use tool calling by any llm using React agent.
Take a look at #22339 which should have addressed this issue. The PR was approved and merged yesterday but a release is yet to be cut from it and should happen in the next few days.
In the meantime, you may try and install langchain-experimental
directly from langchain's source like this:
pip install git+https://github.com/langchain-ai/langchain.git\#egg=langchain-experimental\&subdirectory=libs/experimental
I hope this helps.
Checked other resources
Example Code
ChatOllama does not support bind_tools
Error Message and Stack Trace (if applicable)
No response
Description
ChatOllama does not support bind_tools
System Info
ChatOllama does not support bind_tools