61 lines
3.3 KiB
Bash
61 lines
3.3 KiB
Bash
# SkillOpt Environment Variables
|
|
# Copy this file to .env and fill in your values.
|
|
# Usage: set -a; source .env; set +a
|
|
|
|
# ── Azure OpenAI (required for openai_chat backend) ──────────────────
|
|
export AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
|
|
export AZURE_OPENAI_API_VERSION=2024-12-01-preview
|
|
# Authentication: choose one method
|
|
# Option 1: API Key
|
|
export AZURE_OPENAI_API_KEY=
|
|
export AZURE_OPENAI_AUTH_MODE=api_key
|
|
# Option 2: Azure CLI (no API key needed, recommended on Azure VMs)
|
|
# export AZURE_OPENAI_AUTH_MODE=azure_cli
|
|
# Option 3: Managed Identity
|
|
# export AZURE_OPENAI_AUTH_MODE=managed_identity
|
|
# export AZURE_OPENAI_MANAGED_IDENTITY_CLIENT_ID=your-client-id
|
|
|
|
# ── OpenAI-compatible endpoints ──────────────────────────────────────
|
|
# Path 1: generic research backend. Select openai_compatible explicitly as
|
|
# model.optimizer_backend and/or model.target_backend.
|
|
# export OPENAI_COMPATIBLE_BASE_URL=https://api.deepseek.com/v1
|
|
# export OPENAI_COMPATIBLE_API_KEY=sk-...
|
|
# export OPENAI_COMPATIBLE_MODEL=deepseek-chat
|
|
# Per-role overrides use OPTIMIZER_OPENAI_COMPATIBLE_* and
|
|
# TARGET_OPENAI_COMPATIBLE_* (BASE_URL, API_KEY, MODEL, TEMPERATURE,
|
|
# MAX_TOKENS, TIMEOUT_SECONDS).
|
|
# For scripts/train.py and scripts/eval_only.py, also set model.optimizer and
|
|
# model.target in YAML (or via --cfg-options). Those role model values are
|
|
# applied after backend initialization and override *_MODEL environment values.
|
|
|
|
# Path 2: research openai_chat compatibility mode. This reuses the Azure-family
|
|
# variables but creates a plain OpenAI client (no Azure auth or api-version).
|
|
# export AZURE_OPENAI_ENDPOINT=https://api.openai.com/v1
|
|
# export AZURE_OPENAI_API_KEY=sk-...
|
|
# export AZURE_OPENAI_AUTH_MODE=openai_compatible
|
|
|
|
# Path 3: SkillOpt-Sleep. `skillopt-sleep run --backend azure_openai` uses the
|
|
# same three AZURE_* variables from path 2. Optional Sleep-only controls:
|
|
# export SKILLOPT_SLEEP_COMPAT_MAX_TOKENS=8192
|
|
# export SKILLOPT_SLEEP_CHAT_EXTRA_BODY='{"provider_option": true}'
|
|
|
|
# ── Claude Code CLI (for claude_chat backend) ─────────────────────────
|
|
# Install and authenticate the `claude` CLI before use. For a non-default path:
|
|
# export CLAUDE_CLI_BIN=/path/to/claude
|
|
# ANTHROPIC_API_KEY is one authentication option understood by the CLI; SkillOpt
|
|
# does not create a direct Anthropic API client for this backend.
|
|
# export ANTHROPIC_API_KEY=sk-ant-...
|
|
|
|
# ── Qwen Local Model (for qwen_chat backend) ────────────────────────
|
|
# export QWEN_CHAT_BASE_URL=http://localhost:8000/v1
|
|
# export QWEN_CHAT_MODEL=Qwen/Qwen3.5-4B
|
|
# The train/eval entry points likewise override this model with
|
|
# model.optimizer/model.target for the selected Qwen roles.
|
|
|
|
# ── MiniMax (for minimax_chat backend) ──────────────────────────────
|
|
# export MINIMAX_BASE_URL=https://api.minimax.io/v1
|
|
# export MINIMAX_API_KEY=...
|
|
# When MiniMax is the target, set model.minimax_model in YAML. The current
|
|
# adapter shares one deployment across MiniMax roles; mixed-backend runs cannot
|
|
# independently select a MiniMax optimizer model and a different target model.
|