Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatOllama does not support bind_tools #22165

Open
5 tasks done
Harsh-Kesharwani opened this issue May 25, 2024 · 6 comments · Fixed by #22339
Open
5 tasks done

ChatOllama does not support bind_tools #22165

Harsh-Kesharwani opened this issue May 25, 2024 · 6 comments · Fixed by #22339
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: core Related to langchain-core stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@Harsh-Kesharwani
Copy link

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

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

@dosubot dosubot bot added Ɑ: core Related to langchain-core 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels May 25, 2024
@keenborder786
Copy link
Contributor

You can use OllamaFunctions from langchain_experimental.llms.ollama_functions

@Harsh-Kesharwani
Copy link
Author

@keenborder786 But i have to use function calling along with chat messages as open ai support in there API v1/completion.

@noshila
Copy link

noshila commented May 27, 2024

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.

@keenborder786
Copy link
Contributor

I am afraid that is not possible because Function Calling is a special capability offered only by OpenAI

@keenborder786
Copy link
Contributor

But you can always use tool calling by any llm using React agent.

@lalanikarim
Copy link
Contributor

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.

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: core Related to langchain-core stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants