mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
Updated the API key environment variable examples in the llms.md documentation.
This commit is contained in:
parent
8800432dd7
commit
d4c63ca959
1 changed files with 31 additions and 23 deletions
54
docs/llms.md
54
docs/llms.md
|
@ -68,7 +68,9 @@ has been tested and benchmarked to work well with them:
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export OPENAI_API_KEY=<your-key> # Windows: setx OPENAI_API_KEY <your-key>
|
||||
|
||||
export OPENAI_API_KEY=<key> # Linux/Mac
|
||||
setx OPENAI_API_KEY <key> # Windows
|
||||
|
||||
# GPT-4 Turbo is used by default
|
||||
aider
|
||||
|
@ -99,7 +101,7 @@ has been tested and benchmarked to work well with them:
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export ANTHROPIC_API_KEY=<your-key> # Windows: setx ANTHROPIC_API_KEY <your-key>
|
||||
export ANTHROPIC_API_KEY=<key> # Windows: setx ANTHROPIC_API_KEY <key>
|
||||
|
||||
# Claude 3 Opus
|
||||
aider --opus
|
||||
|
@ -125,7 +127,7 @@ You'll need a [Gemini API key](https://aistudio.google.com/app/u/2/apikey).
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export GEMINI_API_KEY=<your-key> # Windows: setx GEMINI_API_KEY <your-key>
|
||||
export GEMINI_API_KEY=<key> # Windows: setx GEMINI_API_KEY <key>
|
||||
aider --model gemini/gemini-1.5-pro-latest
|
||||
|
||||
# List models available from Gemini
|
||||
|
@ -143,7 +145,7 @@ To use **Llama3 70B**:
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export GROQ_API_KEY=<your-key> # Windows: setx GROQ_API_KEY <your-key>
|
||||
export GROQ_API_KEY=<key> # Windows: setx GROQ_API_KEY <key>
|
||||
aider --model groq/llama3-70b-8192
|
||||
|
||||
# List models available from Groq
|
||||
|
@ -162,7 +164,7 @@ To use **Command-R+**:
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export COHERE_API_KEY=<your-key> # Windows: setx COHERE_API_KEY <your-key>
|
||||
export COHERE_API_KEY=<key> # Windows: setx COHERE_API_KEY <key>
|
||||
aider --model command-r-plus
|
||||
|
||||
# List models available from Cohere
|
||||
|
@ -175,9 +177,12 @@ Aider can connect to the OpenAI models on Azure.
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export AZURE_API_KEY=<your-key> # Windows: setx AZURE_API_KEY <your-key>
|
||||
export AZURE_API_VERSION=2023-05-15 # Windows: setx AZURE_API_VERSION 2023-05-15
|
||||
export AZURE_API_BASE=https://example-endpoint.openai.azure.com # Windows: setx AZURE_API_BASE https://example-endpoint.openai.azure.com
|
||||
|
||||
# Linux/Mac: # Windows:
|
||||
export AZURE_API_KEY=<key> # setx AZURE_API_KEY <key>
|
||||
export AZURE_API_VERSION=2023-05-15 # setx AZURE_API_VERSION 2023-05-15
|
||||
export AZURE_API_BASE=https://myendpt.openai.azure.com # setx AZURE_API_BASE https://myendpt.openai.azure.com
|
||||
|
||||
aider --model azure/<your_deployment_name>
|
||||
|
||||
# List models available from Azure
|
||||
|
@ -191,7 +196,7 @@ You'll need an [OpenRouter API key](https://openrouter.ai/keys).
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export OPENROUTER_API_KEY=<your-key> # Windows: setx OPENROUTER_API_KEY <your-key>
|
||||
export OPENROUTER_API_KEY=<key> # Windows: setx OPENROUTER_API_KEY <key>
|
||||
|
||||
# Or any other open router model
|
||||
aider --model openrouter/<provider>/<model>
|
||||
|
@ -204,7 +209,7 @@ In particular, Llama3 70B works well with aider, at low cost:
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export OPENROUTER_API_KEY=<your-key>
|
||||
export OPENROUTER_API_KEY=<key>
|
||||
aider --model openrouter/meta-llama/llama-3-70b-instruct
|
||||
```
|
||||
|
||||
|
@ -215,7 +220,7 @@ Aider can connect to local Ollama models.
|
|||
|
||||
```
|
||||
# Pull the model
|
||||
ollama pull <MODEL>
|
||||
ollama pull <model>
|
||||
|
||||
# Start your ollama server
|
||||
ollama serve
|
||||
|
@ -223,7 +228,7 @@ ollama serve
|
|||
# In another terminal window
|
||||
pip install aider-chat
|
||||
export OLLAMA_API_BASE=http://127.0.0.1:11434 # Windows: setx OLLAMA_API_BASE http://127.0.0.1:11434
|
||||
aider --model ollama/<MODEL>
|
||||
aider --model ollama/<model>
|
||||
```
|
||||
|
||||
In particular, `llama3:70b` works very well with aider:
|
||||
|
@ -234,7 +239,7 @@ ollama pull llama3:70b
|
|||
ollama serve
|
||||
|
||||
# ...in another terminal window...
|
||||
export OLLAMA_API_BASE=http://127.0.0.1:11434
|
||||
export OLLAMA_API_BASE=http://127.0.0.1:11434 # Windows: setx OLLAMA_API_BASE http://127.0.0.1:11434
|
||||
aider --model ollama/llama3:70b
|
||||
```
|
||||
|
||||
|
@ -250,8 +255,11 @@ They appear to grant 5M tokens of free API usage to new accounts.
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export OPENAI_API_KEY=<your-key> # Windows: setx OPENAI_API_KEY <your-key>
|
||||
export OPENAI_API_BASE=https://api.deepseek.com/v1 # Windows: setx OPENAI_API_BASE https://api.deepseek.com/v1
|
||||
|
||||
# Linux/Mac: # Windows:
|
||||
export OPENAI_API_KEY=<key> # setx OPENAI_API_KEY <key>
|
||||
export OPENAI_API_BASE=https://api.deepseek.com/v1 # setx OPENAI_API_BASE https://api.deepseek.com/v1
|
||||
|
||||
aider --model openai/deepseek-coder
|
||||
```
|
||||
|
||||
|
@ -266,10 +274,10 @@ Aider can connect to any LLM which is accessible via an OpenAI compatible API en
|
|||
|
||||
```
|
||||
pip install aider-chat
|
||||
export OPENAI_API_BASE=<your-endpoint-goes-here> # Windows: setx OPENAI_API_BASE <your-endpoint-goes-here>
|
||||
|
||||
# If your endpoint needs a key
|
||||
export OPENAI_API_KEY=<your-key> # Windows: setx OPENAI_API_KEY <your-key>
|
||||
# Linux/Mac: # Windows:
|
||||
export OPENAI_API_BASE=<endpoint> # setx OPENAI_API_BASE <endpoint>
|
||||
export OPENAI_API_KEY=<key> # setx OPENAI_API_KEY <key>
|
||||
|
||||
# Prefix the model name with openai/
|
||||
aider --model openai/<model-name>
|
||||
|
@ -396,12 +404,12 @@ models you use with aider.
|
|||
Here is an example `.env` file:
|
||||
|
||||
```
|
||||
OPENAI_API_KEY=<your-key>
|
||||
ANTHROPIC_API_KEY=<your-key>
|
||||
GROQ_API_KEY=<your-key>
|
||||
OPENROUTER_API_KEY=<your-key>
|
||||
OPENAI_API_KEY=<key>
|
||||
ANTHROPIC_API_KEY=<key>
|
||||
GROQ_API_KEY=<key>
|
||||
OPENROUTER_API_KEY=<key>
|
||||
|
||||
AZURE_API_KEY=<your-key>
|
||||
AZURE_API_KEY=<key>
|
||||
AZURE_API_VERSION=2023-05-15
|
||||
AZURE_API_BASE=https://example-endpoint.openai.azure.com
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue