From 4efa97201fa8e5c7b05838f57c0497456177add5 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 28 Apr 2024 11:52:38 -0700 Subject: [PATCH] copy --- docs/llms.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/llms.md b/docs/llms.md index dad55f427..b85dc3ede 100644 --- a/docs/llms.md +++ b/docs/llms.md @@ -21,6 +21,10 @@ Cohere also offers free API access to their [Command-R+ model](#cohere), which works with aider as a *very basic* coding assistant. +## Local models + +Aider can work also with local models, for example using [Ollama](#ollama). + ## Other models Aider supports connecting to almost any LLM, @@ -39,6 +43,7 @@ So you should expect that models which are less capable than GPT-3.5 may struggl - [Azure](#azure) - [OpenRouter](#openrouter) - [OpenAI compatible APIs](#openai-compatible-apis) +- [Ollama](#ollama) - [Other LLMs](#other-llms) - [Model warnings](#model-warnings) - [Editing format](#editing-format) @@ -214,6 +219,26 @@ See the [model warnings](#model-warnings) section for information on warnings which will occur when working with models that aider is not familiar with. +## Ollama + +Aider can connect to local Ollama models. + +``` +# Start your ollama server +ollama serve + +# In another terminal window: +export OLLAMA_API_BASE=http://127.0.0.1:11434 +aider --model ollama/ +``` + +The Llama3 70B model works well with aider. +Give aider the `--edit-format diff` switch if you're working with it. + +Also see the [model warnings](#model-warnings) +section for information on warnings which will occur +when working with models that aider is not familiar with. + ## Other LLMs Aider uses the [litellm](https://docs.litellm.ai/docs/providers) package