-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
60 lines (53 loc) · 2.21 KB
/
Copy pathconfig.example.yaml
File metadata and controls
60 lines (53 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# AINL Configuration Template
# Copy and customize for your deployment.
#
# Environment variable expansion:
# - In this file, you can use ${VAR} or $VAR to reference environment variables.
# - API keys are STRONGLY recommended to be set via environment variables
# rather than hard-coding them in this file.
# - Set variables in your shell before running, or use a `.env` file with
# a tool like `direnv` or `dotenv`.
# LLM provider configuration
llm:
# List of providers to register
providers:
openrouter:
# API key: prefer setting via OPENROUTER_API_KEY environment variable
# api_key: "${OPENROUTER_API_KEY}" # expanded from env
model: stepfun/step-3.5-flash:free # free model on OpenRouter
max_tokens: 800
json_mode: true # enable JSON mode if supported
# Optional: base_url, referer, title for OpenRouter
# base_url: https://openrouter.ai/api/v1
# referer: https://your-app.example.com
# title: "My AINL App"
# Example: Anthropic (requires ANTHROPIC_API_KEY env)
# anthropic:
# api_key: "${ANTHROPIC_API_KEY}"
# model: claude-3-5-sonnet-20241022
# max_tokens: 800
# json_mode: true
# Example: Cohere (requires COHERE_API_KEY env)
# cohere:
# api_key: "${COHERE_API_KEY}"
# model: command-r-plus
# max_tokens: 800
# json_mode: true
# Example: Ollama (local)
# ollama:
# base_url: http://localhost:11434
# model: llama3
# Fallback chain: list of provider names to try in order if one fails
fallback_chain: ["openrouter"] # or ["anthropic", "cohere", "openrouter"]
# Optional: circuit breaker settings (apply across all network adapters)
# Example configuration:
# circuit_breaker:
# failure_threshold: 5 # consecutive failures to trip
# recovery_timeout_s: 300 # seconds before trying again
# half_open_max_calls: 3 # calls in half-open state
# circuit_breaker:
# failure_threshold: 5 # consecutive failures to trip
# recovery_timeout_s: 300 # seconds before trying again
# half_open_max_calls: 3 # calls in half-open state
# Optional: other adapter namespaces can be configured similarly
# memory, fs, sqlite, etc.