mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
feat: add missing dependency hints for Gemini and Bedrock
This commit is contained in:
parent
f2d2ab51b1
commit
779983cb85
3 changed files with 16 additions and 5 deletions
|
@ -78,4 +78,13 @@ class LiteLLMExceptions:
|
||||||
|
|
||||||
def get_ex_info(self, ex):
|
def get_ex_info(self, ex):
|
||||||
"""Return the ExInfo for a given exception instance"""
|
"""Return the ExInfo for a given exception instance"""
|
||||||
|
import litellm
|
||||||
|
|
||||||
|
if ex.__class__ is litellm.APIConnectionError:
|
||||||
|
if "google.auth" in str(ex):
|
||||||
|
return ExInfo(
|
||||||
|
"APIConnectionError", False, "You need to: pip install google-generativeai"
|
||||||
|
)
|
||||||
|
if "boto3" in str(ex):
|
||||||
|
return ExInfo("APIConnectionError", False, "You need to: pip install boto3")
|
||||||
return self.exceptions.get(ex.__class__, ExInfo(None, None, None))
|
return self.exceptions.get(ex.__class__, ExInfo(None, None, None))
|
||||||
|
|
|
@ -50,7 +50,7 @@ pip install boto3
|
||||||
To use aider installed via `pipx` with AWS Bedrock, you must add the `boto3` dependency to aider's virtual environment by running
|
To use aider installed via `pipx` with AWS Bedrock, you must add the `boto3` dependency to aider's virtual environment by running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pipx inject aider boto3
|
pipx inject aider-chat boto3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,17 @@ nav_order: 300
|
||||||
|
|
||||||
# Gemini
|
# Gemini
|
||||||
|
|
||||||
Google currently offers
|
|
||||||
[*free* API access to the Gemini 1.5 Pro model](https://ai.google.dev/pricing).
|
|
||||||
This is the most capable free model to use with aider,
|
|
||||||
with code editing capability that's comparable to GPT-3.5.
|
|
||||||
You'll need a [Gemini API key](https://aistudio.google.com/app/u/2/apikey).
|
You'll need a [Gemini API key](https://aistudio.google.com/app/u/2/apikey).
|
||||||
|
|
||||||
```
|
```
|
||||||
python -m pip install -U aider-chat
|
python -m pip install -U aider-chat
|
||||||
|
|
||||||
|
# You may need to install google-generativeai
|
||||||
|
pip install -U google-generativeai
|
||||||
|
|
||||||
|
# Or with pipx...
|
||||||
|
pipx inject aider-chat google-generativeai
|
||||||
|
|
||||||
export GEMINI_API_KEY=<key> # Mac/Linux
|
export GEMINI_API_KEY=<key> # Mac/Linux
|
||||||
setx GEMINI_API_KEY <key> # Windows, restart shell after setx
|
setx GEMINI_API_KEY <key> # Windows, restart shell after setx
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue