- Implement multi-engine failover system with configurable fallback order - Add retry logic with exponential backoff and rate limit detection - Introduce search configuration options: * fallback_engines: Ordered list of backup search providers * retry_delay: Seconds between retry batches (default: 60) * max_retries: Maximum system-wide retry attempts (default: 3) - Improve error resilience with: - Automatic engine switching on 429/Too Many Requests - Full system retries after configurable cooldown periods - Detailed logging for diagnostics and monitoring - Enhance engine prioritization logic: 1. Primary configured engine 2. Configured fallback engines 3. Remaining available engines Example configuration: [search] engine = "Google" fallback_engines = ["DuckDuckGo", "Baidu"] # Cascading fallback order retry_delay = 60 # 1 minute between retry batches max_retries = 3 # Attempt 3 full system retries This addresses critical reliability issues by: - Preventing search failures due to single-engine rate limits - Enabling recovery from transient network errors - Providing operational flexibility through configurable parameters - Improving visibility through granular logging (INFO/WARN/ERROR)
74 lines
2.7 KiB
TOML
74 lines
2.7 KiB
TOML
# Global LLM configuration
|
|
[llm]
|
|
model = "claude-3-7-sonnet-20250219" # The LLM model to use
|
|
base_url = "https://api.anthropic.com/v1/" # API endpoint URL
|
|
api_key = "YOUR_API_KEY" # Your API key
|
|
max_tokens = 8192 # Maximum number of tokens in the response
|
|
temperature = 0.0 # Controls randomness
|
|
|
|
# [llm] #AZURE OPENAI:
|
|
# api_type= 'azure'
|
|
# model = "YOUR_MODEL_NAME" #"gpt-4o-mini"
|
|
# base_url = "{YOUR_AZURE_ENDPOINT.rstrip('/')}/openai/deployments/{AZURE_DEPOLYMENT_ID}"
|
|
# api_key = "AZURE API KEY"
|
|
# max_tokens = 8096
|
|
# temperature = 0.0
|
|
# api_version="AZURE API VERSION" #"2024-08-01-preview"
|
|
|
|
# [llm] #OLLAMA:
|
|
# api_type = 'ollama'
|
|
# model = "llama3.2"
|
|
# base_url = "http://localhost:11434/v1"
|
|
# api_key = "ollama"
|
|
# max_tokens = 4096
|
|
# temperature = 0.0
|
|
|
|
# Optional configuration for specific LLM models
|
|
[llm.vision]
|
|
model = "claude-3-7-sonnet-20250219" # The vision model to use
|
|
base_url = "https://api.anthropic.com/v1/" # API endpoint URL for vision model
|
|
api_key = "YOUR_API_KEY" # Your API key for vision model
|
|
max_tokens = 8192 # Maximum number of tokens in the response
|
|
temperature = 0.0 # Controls randomness for vision model
|
|
|
|
# [llm.vision] #OLLAMA VISION:
|
|
# api_type = 'ollama'
|
|
# model = "llama3.2-vision"
|
|
# base_url = "http://localhost:11434/v1"
|
|
# api_key = "ollama"
|
|
# max_tokens = 4096
|
|
# temperature = 0.0
|
|
|
|
# Optional configuration for specific browser configuration
|
|
# [browser]
|
|
# Whether to run browser in headless mode (default: false)
|
|
#headless = false
|
|
# Disable browser security features (default: true)
|
|
#disable_security = true
|
|
# Extra arguments to pass to the browser
|
|
#extra_chromium_args = []
|
|
# Path to a Chrome instance to use to connect to your normal browser
|
|
# e.g. '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
|
|
#chrome_instance_path = ""
|
|
# Connect to a browser instance via WebSocket
|
|
#wss_url = ""
|
|
# Connect to a browser instance via CDP
|
|
#cdp_url = ""
|
|
|
|
# Optional configuration, Proxy settings for the browser
|
|
# [browser.proxy]
|
|
# server = "http://proxy-server:port"
|
|
# username = "proxy-username"
|
|
# password = "proxy-password"
|
|
|
|
# Optional configuration, Search settings.
|
|
# [search]
|
|
# Search engine for agent to use. Default is "Google", can be set to "Baidu" or "DuckDuckGo".
|
|
#engine = "Google"
|
|
# Fallback engine order. Default is ["DuckDuckGo", "Baidu"] - will try in this order after primary engine fails.
|
|
#fallback_engines = ["DuckDuckGo", "Baidu"]
|
|
# Seconds to wait before retrying all engines again when they all fail due to rate limits. Default is 60.
|
|
#retry_delay = 60
|
|
# Maximum number of times to retry all engines when all fail. Default is 3.
|
|
#max_retries = 3
|