update env var docs

This commit is contained in:
AI Christianson 2024-12-13 13:40:13 -05:00
parent 250bf0a84c
commit 571b9474d3
2 changed files with 14 additions and 11 deletions

View File

@ -104,20 +104,26 @@ pip install aider-chat
2. API keys for the required AI services: 2. API keys for the required AI services:
```bash ```bash
# Default: Set up Anthropic API key (default provider) # Set up API keys based on your preferred provider:
# For Anthropic Claude models (recommended)
export ANTHROPIC_API_KEY=your_api_key_here export ANTHROPIC_API_KEY=your_api_key_here
# Required for expert tool and OpenAI provider # For OpenAI models
export OPENAI_API_KEY=your_api_key_here export OPENAI_API_KEY=your_api_key_here
# Required for OpenRouter provider # For OpenRouter provider (optional)
export OPENROUTER_API_KEY=your_api_key_here export OPENROUTER_API_KEY=your_api_key_here
# For OpenAI-compatible providers # For OpenAI-compatible providers (optional)
export OPENAI_API_KEY=your_api_key_here
export OPENAI_API_BASE=your_api_base_url export OPENAI_API_BASE=your_api_base_url
``` ```
Note: The programmer tool (aider) will automatically select its model based on your available API keys:
- If ANTHROPIC_API_KEY is set, it will use Claude models
- If only OPENAI_API_KEY is set, it will use OpenAI models
- You can set multiple API keys to enable different features
You can get your API keys from: You can get your API keys from:
- Anthropic API key: https://console.anthropic.com/ - Anthropic API key: https://console.anthropic.com/
- OpenAI API key: https://platform.openai.com/api-keys - OpenAI API key: https://platform.openai.com/api-keys
@ -147,6 +153,8 @@ ra-aid -m "Explain the authentication flow" --research-only
RA.Aid supports multiple AI providers and models. The default model is Anthropic's Claude 3 Sonnet (`claude-3-5-sonnet-20241022`). RA.Aid supports multiple AI providers and models. The default model is Anthropic's Claude 3 Sonnet (`claude-3-5-sonnet-20241022`).
The programmer tool (aider) automatically selects its model based on your available API keys. It will use Claude models if ANTHROPIC_API_KEY is set, or fall back to OpenAI models if only OPENAI_API_KEY is available.
#### Environment Variables #### Environment Variables
RA.Aid supports multiple providers through environment variables: RA.Aid supports multiple providers through environment variables:
@ -172,7 +180,7 @@ export OPENROUTER_API_KEY=your_api_key_here
export OPENAI_API_BASE=your_api_base_url export OPENAI_API_BASE=your_api_base_url
``` ```
Note: The expert tool always uses OpenAI's `o1-preview` model and requires `OPENAI_API_KEY` to be set, even if you're using a different provider for the main application. Additionally, the programmer tool (aider) is currently hardcoded to use Anthropic Claude - this is something we plan to fix in a future update. Note: The expert tool always uses OpenAI's `o1-preview` model and requires `OPENAI_API_KEY` to be set, even if you're using a different provider for the main application.
#### Examples #### Examples

View File

@ -14,11 +14,6 @@ console = Console()
def run_shell_command(command: str) -> Dict[str, Union[str, int, bool]]: def run_shell_command(command: str) -> Dict[str, Union[str, int, bool]]:
"""Execute a shell command and return its output. """Execute a shell command and return its output.
Assume these are available:
- rg
- tree
- standard linux utilities
Important notes: Important notes:
1. Try to constrain/limit the output. Output processing is expensive, and infinite/looping output will cause us to fail. 1. Try to constrain/limit the output. Output processing is expensive, and infinite/looping output will cause us to fail.
2. When using commands like 'find', 'grep', or similar recursive search tools, always exclude common 2. When using commands like 'find', 'grep', or similar recursive search tools, always exclude common