mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 12:14:59 +00:00
added vertex docs
This commit is contained in:
parent
2a3df75e5b
commit
b6d4493577
3 changed files with 46 additions and 4 deletions
|
@ -33,8 +33,8 @@ aider --models anthropic/
|
|||
Anthropic has very low rate limits.
|
||||
You can access all the Anthropic models via
|
||||
[OpenRouter](openrouter.md)
|
||||
without rate limits.
|
||||
For example: `aider --model openrouter/anthropic/claude-3.5-sonnet`
|
||||
or [Google Vertex AI](vertex.md)
|
||||
with more generous rate limits.
|
||||
|
||||
You can use `aider --model <model-name>` to use any other Anthropic model.
|
||||
For example, if you want to use a specific version of Opus
|
||||
|
|
|
@ -21,7 +21,7 @@ aider --model openrouter/<provider>/<model>
|
|||
aider --models openrouter/
|
||||
```
|
||||
|
||||
In particular, Llama3 70B works well with aider, at low cost:
|
||||
In particular, many aider users access Sonnet via OpenRouter:
|
||||
|
||||
```
|
||||
python -m pip install aider-chat
|
||||
|
@ -29,7 +29,7 @@ python -m pip install aider-chat
|
|||
export OPENROUTER_API_KEY=<key> # Mac/Linux
|
||||
setx OPENROUTER_API_KEY <key> # Windows, restart shell after setx
|
||||
|
||||
aider --model openrouter/meta-llama/llama-3-70b-instruct
|
||||
aider --model openrouter/anthropic/claude-3.5-sonnet
|
||||
```
|
||||
|
||||
|
||||
|
|
42
aider/website/docs/llms/vertex.md
Normal file
42
aider/website/docs/llms/vertex.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
parent: Connecting to LLMs
|
||||
nav_order: 550
|
||||
---
|
||||
|
||||
# Vertex AI
|
||||
|
||||
Aider can connect to models provided by Google Vertex AI.
|
||||
You will need to install the
|
||||
[gcloud CLI](https://cloud.google.com/sdk/docs/install) and [login](https://cloud.google.com/sdk/docs/initializing) with a GCP account
|
||||
or service account with permission to use the Vertex AI API.
|
||||
|
||||
With your chosen login method, the gcloud CLI should automatically set the
|
||||
`GOOGLE_APPLICATION_CREDENTIALS` environment variable which points to the credentials file.
|
||||
|
||||
To configure Aider to use the Vertex AI API, you need to set `VERTEXAI_PROJECT` (the GCP project ID)
|
||||
and `VERTEXAI_LOCATION` (the GCP region) [environment variables for Aider](/docs/config/dotenv.html).
|
||||
|
||||
Note that Claude on Vertex AI is only available in certain GCP regions,
|
||||
check [the model card](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet)
|
||||
for your model to see which regions are supported.
|
||||
|
||||
Example `.env` file:
|
||||
|
||||
```
|
||||
VERTEXAI_PROJECT=my-project
|
||||
VERTEXAI_LOCATION=us-east5
|
||||
```
|
||||
|
||||
Then you can run aider with the `--model` command line switch, like this:
|
||||
|
||||
```
|
||||
aider --model vertex_ai/claude-3-5-sonnet@20240620
|
||||
```
|
||||
|
||||
Or you can use the [yaml config](/docs/config/aider_conf.html) to set the model to any of the Anthropic models supported by Vertex AI.
|
||||
|
||||
Example `.aider.conf.yml` file:
|
||||
|
||||
```yaml
|
||||
model: vertex_ai/claude-3-5-sonnet@20240620
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue