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

ollama models #18

Open
martinjaco opened this issue Jun 7, 2024 · 3 comments
Open

ollama models #18

martinjaco opened this issue Jun 7, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@martinjaco
Copy link

How to make use of ollama models instead of Openai models?

@boyuZh
Copy link
Member

boyuZh commented Jun 12, 2024

As far as I know, most of the open-source models supported by ollama do not support tool usage. But if you find one, you can modify the openai api as per this doc.

@BruceYanghy BruceYanghy added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 17, 2024
@zhengr
Copy link

zhengr commented Jun 26, 2024

The Agent stuff totally leverage the LLM model functionality, such as function calling. If you want to try ollama, check the model`s function calling. Most of them are not good enough.

@amiles2233
Copy link

amiles2233 commented Oct 22, 2024

There are a few models that support tool usage on Ollama now, such as Llama 3.1, Llama 3.2, Mixtral, and Command-R. The list can be found here

You can replace the OpenAI config snippet with this to use llama models

config_list = [
    {
        "model": "llama3.1",
        "base_url": "http://127.0.0.1:11434/v1",
        "api_key": "ollama",
    }
]

llm_config = {"config_list": config_list, "timeout": 120, "temperature": 0}

I'll echo what @zhengr wrote though. In my limited experience, I found the OpenAI models to be much smoother. Specifically in the forecaster, the llama and mixtral models weren't consistently running successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants