Files
agent-maxim/bridge/config.py
T
Anton 052591281d Initial clean version - Agent Maxim
- Complete agent system with planning and execution
- Bridge API with FastAPI server
- WhatsApp-style mobile dashboard
- Enhanced web search with query improvement
- Security guards and policy checks
- Comprehensive documentation
2026-04-09 18:07:43 +03:00

32 lines
1.2 KiB
Python

"""Bridge configuration — read from env, fall back to defaults."""
from __future__ import annotations
import os
from pathlib import Path
# Directory where per-run state and audit logs are stored
RUNS_DIR: Path = Path(__file__).parent / "runs"
# OpenAI settings
OPENAI_API_KEY: str = os.environ.get("OPENAI_API_KEY", "")
OPENAI_MODEL: str = os.environ.get("OPENAI_MODEL", "gpt-4o-mini")
# Ollama settings
OLLAMA_HOST: str = os.environ.get("OLLAMA_HOST", "http://localhost:11434")
OLLAMA_MODEL: str = os.environ.get("OLLAMA_MODEL", "qwen2.5:7b") # legacy alias
OLLAMA_FALLBACK_MODEL: str = "llama3.2:3b"
# Model routing — set independently via env vars
# DECISION_MODEL: used by controller decision loop (structured JSON output)
# CHAT_MODEL: used by user-facing chat replies (natural language)
DECISION_MODEL: str = os.environ.get("DECISION_MODEL", OLLAMA_MODEL)
CHAT_MODEL: str = os.environ.get("CHAT_MODEL", "llama3.2:3b")
# Chat generation settings (tuned for low latency + short replies)
CHAT_MAX_TOKENS: int = int(os.environ.get("CHAT_MAX_TOKENS", "150"))
CHAT_TEMPERATURE: float = float(os.environ.get("CHAT_TEMPERATURE", "0.3"))
# Server settings
HOST: str = os.environ.get("BRIDGE_HOST", "0.0.0.0")
PORT: int = int(os.environ.get("BRIDGE_PORT", "8000"))