#Using Ollama

10 messages · Page 1 of 1 (latest)

worldly flicker
#

Hey team, I am trying t get Open Intrpreter to work with my local network Ollama API. It works with OpenAI's API just fine, but I can't get it to talk to my Ollama API.

The API is accessible from the machine I am running Open Interpreter on, and I can make CURL calls to it fine.

I am trying to run it like this:
interpreter --model ollama/solar --api_base http://ts-009.local:11434

I've tried a bunch of variations on the model, all with the same result.

Any help would be much appreciated.

azure bobcat
#
interpreter --model ollama/solar
worldly flicker
# azure bobcat ``` interpreter --model ollama/solar ```

thank you Anton. that is what i am doing, plus the url (my api is on another machine on my land), so i am running:
interpreter --model ollama/solar --api_base http://ts-009.local:11434

it returns an error for missing api key:
litellm.exceptions.APIError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

my api does not need a key. when i give it a fake key, i get this:
litellm.exceptions.NotFoundError: OpenAIException - 404 page not found

i don't think it's trying to hit my api, and i don't know where to add that config

thank you for your help 🙂

azure bobcat
#

I see

#
interpreter --model ... --api_base ... --api_key dummykey
#
interpreter --model ollama_chat/<model-name> 

After reading the docs seems like it is ollama_chat not ollama

worldly flicker
#

thank you, i really appreciate your help. tried that, but still getting:
litellm.exceptions.NotFoundError: OpenAIException - 404 page not found

notice it says OpenAIException - it is still trying to use the OpenAI api, not my local

azure bobcat
#

There is a solution in the issue here