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

Use local LLM via Ollama #123

Open
Norfeldt opened this issue Jul 31, 2024 · 5 comments
Open

Use local LLM via Ollama #123

Norfeldt opened this issue Jul 31, 2024 · 5 comments

Comments

@Norfeldt
Copy link

Is it possible to use a local LLM via Ollama. If, what's the setup and what's the requirement for which LLM I can use (guessing it has to use openai api syntax)?

@netcaster1
Copy link

  1. ai config
    a. change openai api endpoint to http://{your ollama ip:port}/v1
    b. if step a is done properly, then when you select 'Model ', you can see all models in your ollama, just select your prefer one
    (if not working, check if OLLAMA_ORIGINS=* has been setup correctly)

  2. next will be a trick, looks still ai shell will look for 'gpt-3.5-turbo' model, then let's create one fake one in ollama to cheat ai shell
    for example:
    ollama show llama3.1:latest --modelfile > /tmp/llama3.1.modelfile
    ollama create gpt-3.5-turbo --file /tmp/llama3.1.modelfile
    ollama list

  3. test
    ai list files

Done.

@Ajaymamtora
Copy link

It starts writing out the command but then cancels itself and says this:

Request to OpenAI failed with status 404:

{
"error": {
"message": "model "gpt-3.5-turbo" not found, try pulling it first",
"type": "api_error",
"param": null,
"code": null
}
}

@mxl
Copy link

mxl commented Sep 21, 2024

@Ajaymamtora This was fixed in #115 but a new version is not released yet. @steve8708 could you help us with that?

@steve8708
Copy link
Contributor

published!

@ibrahim-string
Copy link

so is this feature implemented?
I just wanna know if I can run this with ollama models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants