|
2 | 2 | > |
3 | 3 | > This repository includes **AutoEvolve**, a [Sky Computing Lab, UC Berkeley](https://sky.cs.berkeley.edu/) research extension that builds on top of OpenEvolve. AutoEvolve addresses a key challenge in LLM-driven evolution: when evolution stagnates, the system automatically generates breakthrough ideas using structured problem analysis, then adapts its exploration strategy based on what succeeds and fails. |
4 | 4 |
|
5 | | -## Azure OpenAI Support |
| 5 | +## 🚀 Azure OpenAI Support |
6 | 6 |
|
7 | | -AutoEvolve supports Azure OpenAI endpoints. The system automatically detects Azure endpoints and uses the appropriate client. |
| 7 | +AutoEvolve now supports **Azure OpenAI** with automatic detection. Simply configure your Azure endpoint in the config file and the system will automatically use the `AzureOpenAI` client. |
8 | 8 |
|
9 | | -### Configuration |
| 9 | +### Quick Setup for Azure OpenAI |
10 | 10 |
|
11 | | -In your `config.yaml`, set the Azure endpoint URL: |
| 11 | +Add the following to your `config.yaml`: |
12 | 12 |
|
13 | 13 | ```yaml |
| 14 | +# LLM configuration |
14 | 15 | llm: |
15 | 16 | primary_model: "gpt-5" # Your Azure deployment name |
16 | 17 | api_base: "https://YOUR_RESOURCE.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT?api-version=2024-12-01-preview" |
17 | | - # api_key: Set via OPENAI_API_KEY environment variable or uncomment and set here |
18 | | - |
| 18 | + api_key: "YOUR_AZURE_API_KEY" # Set your API key here or use OPENAI_API_KEY env var |
| 19 | + primary_model_weight: 1.0 |
| 20 | + temperature: 0.7 |
| 21 | + top_p: 0.95 |
| 22 | + max_tokens: 32000 |
| 23 | + timeout: 600 |
| 24 | + |
| 25 | +# Database configuration |
19 | 26 | database: |
| 27 | + # ... other settings ... |
| 28 | + |
| 29 | + # Paradigm Breakthrough (for stagnation handling) |
20 | 30 | enable_paradigm_breakthrough: true |
21 | | - paradigm_model: "gpt-5-mini" # Your Azure deployment name for paradigms |
| 31 | + stagnation_window: 5 |
| 32 | + stagnation_improvement_threshold: 0.01 |
| 33 | + paradigm_model: "gpt-5-mini" # Your Azure deployment name for paradigm generation |
22 | 34 | paradigm_api_base: "https://YOUR_RESOURCE.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT?api-version=2024-12-01-preview" |
23 | | - # paradigm_api_key: Set via OPENAI_API_KEY environment variable or uncomment and set here |
| 35 | + paradigm_api_key: "YOUR_AZURE_API_KEY" # Set your API key here or use OPENAI_API_KEY env var |
24 | 36 | ``` |
25 | 37 |
|
26 | | -**Important:** |
27 | | -- The `api_base` URL must include the full path: `/openai/deployments/DEPLOYMENT_NAME?api-version=VERSION` |
28 | | -- The `primary_model` and `paradigm_model` should match your Azure deployment names |
29 | | -- API keys can be set via environment variables (`OPENAI_API_KEY`) or directly in config |
30 | | -- The system automatically uses `AzureOpenAI` class when Azure endpoints are detected |
| 38 | +### Important Notes |
| 39 | +
|
| 40 | +- **Deployment Name**: The `primary_model` and `paradigm_model` should match your Azure deployment names (e.g., `gpt-5`, `gpt-4.1`, `gpt-5-mini`) |
| 41 | +- **API Base URL Format**: Must include the full path: `https://YOUR_RESOURCE.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT?api-version=2024-12-01-preview` |
| 42 | +- **API Version**: Use `2024-12-01-preview` (or your Azure API version) |
| 43 | +- **Automatic Detection**: The system automatically detects Azure endpoints (`.openai.azure.com`) and uses the `AzureOpenAI` client |
| 44 | +- **Reasoning Models**: Supports reasoning models like `gpt-5`, `gpt-5-mini` - automatically uses `max_completion_tokens` instead of `max_tokens` |
| 45 | +- **API Key**: You can set it in the config file or use the `OPENAI_API_KEY` environment variable |
| 46 | + |
| 47 | +### Example: Complete Azure Configuration |
| 48 | + |
| 49 | +```yaml |
| 50 | +llm: |
| 51 | + primary_model: "gpt-5" |
| 52 | + api_base: "https://east-docetl.openai.azure.com/openai/deployments/gpt-4.1?api-version=2024-12-01-preview" |
| 53 | + api_key: "YOUR_API_KEY_HERE" # Replace with your actual Azure API key |
| 54 | +
|
| 55 | +database: |
| 56 | + enable_paradigm_breakthrough: true |
| 57 | + paradigm_model: "gpt-5-mini" |
| 58 | + paradigm_api_base: "https://east-docetl.openai.azure.com/openai/deployments/gpt-4.1?api-version=2024-12-01-preview" |
| 59 | + paradigm_api_key: "YOUR_API_KEY_HERE" # Replace with your actual Azure API key |
| 60 | +``` |
31 | 61 |
|
32 | | -See `configs/README.md` for more details. |
| 62 | +**That's it!** Just replace `YOUR_API_KEY_HERE` with your actual Azure API key and everything will work automatically. |
0 commit comments