Skip to content

How to use custom models with ollama? #31

@CyberT33N

Description

@CyberT33N

Dear Team,

First of all, thank you for creating such a great project. I'm really enjoying exploring its capabilities.

I'm currently trying to integrate my own custom Ollama model, but I'm having some difficulty understanding the proper configuration process. Specifically, I'm encountering issues when trying to use a custom model.

Here's the scenario:

I have a local Ollama model named "test123".

Through the user interface, I can't seem to directly specify this model.

I've resorted to modifying the Postgresql database to set "test123" as the default model in the configuration.

While the configuration appears to be updated, the chat completion requests still fail.

The error message indicates that the system is attempting to use the model "llama3.1," which does not exist locally on my setup.

I've created the new configuration and set it as default. However, the error message consistently shows that it tries to use llama3.1 as model, even though this model does not exist on my system.

Here is the error message I am receiving:

Error in chat completion: APICallError [AI_APICallError]: Not Found
{
cause: undefined,
url: 'http://127.0.0.1:11434/api/chat',
requestBodyValues: {
format: undefined,
model: 'llama3.1',
options: { temperature: 0 },
messages: [ [Object], [Object] ],
tools: undefined,
stream: false
},
statusCode: 404,
responseHeaders: {
'content-length': '62',
'content-type': 'application/json; charset=utf-8',
date: 'Sat, 18 Jan 2025 18:44:56 GMT'
},
responseBody: '{"error":"model \"llama3.1\" not found, try pulling it first"}',
isRetryable: false,
data: undefined,
[Symbol(vercel.ai.error)]: true,
[Symbol(vercel.ai.error.AI_APICallError)]: true
}
POST /chat/completions 500 in 81ms

Am I missing a crucial step in the configuration process? Is there a specific procedure I should be following to correctly specify and use my custom Ollama model ("test123")?

Any guidance or clarification you could provide would be greatly appreciated.

Thank you for your time and assistance.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions