Includes updates across gateway, router, node-worker, memory-service, aurora-service, swapper, sofiia-console UI and node2 infrastructure: - gateway-bot: Dockerfile, http_api.py, druid/aistalk prompts, doc_service - services/router: main.py, router-config.yml, fabric_metrics, memory_retrieval, offload_client, prompt_builder - services/node-worker: worker.py, main.py, config.py, fabric_metrics - services/memory-service: Dockerfile, database.py, main.py, requirements - services/aurora-service: main.py (+399), kling.py, quality_report.py - services/swapper-service: main.py, swapper_config_node2.yaml - services/sofiia-console: static/index.html (console UI update) - config: agent_registry, crewai_agents/teams, router_agents - ops/fabric_preflight.sh: updated preflight checks - router-config.yml, docker-compose.node2.yml: infra updates - docs: NODA1-AGENT-ARCHITECTURE, fabric_contract updated Made-with: Cursor
33 lines
1.7 KiB
Python
33 lines
1.7 KiB
Python
"""Node-worker configuration from environment."""
|
|
import os
|
|
|
|
NODE_ID = os.getenv("NODE_ID", "noda2")
|
|
NATS_URL = os.getenv("NATS_URL", "nats://dagi-nats:4222")
|
|
OLLAMA_BASE_URL = os.getenv("OLLAMA_BASE_URL", "http://host.docker.internal:11434")
|
|
DEFAULT_LLM = os.getenv("NODE_DEFAULT_LLM", "qwen3:14b")
|
|
DEFAULT_VISION = os.getenv("NODE_DEFAULT_VISION", "llava:13b")
|
|
MAX_CONCURRENCY = int(os.getenv("NODE_WORKER_MAX_CONCURRENCY", "2"))
|
|
MAX_PAYLOAD_BYTES = int(os.getenv("NODE_WORKER_MAX_PAYLOAD_BYTES", str(1024 * 1024)))
|
|
PORT = int(os.getenv("PORT", "8109"))
|
|
|
|
STT_PROVIDER = os.getenv("STT_PROVIDER", "none")
|
|
TTS_PROVIDER = os.getenv("TTS_PROVIDER", "none")
|
|
OCR_PROVIDER = os.getenv("OCR_PROVIDER", "vision_prompted")
|
|
IMAGE_PROVIDER = os.getenv("IMAGE_PROVIDER", "none")
|
|
|
|
# Memory Service URL (used by memory_service STT/TTS providers)
|
|
MEMORY_SERVICE_URL = os.getenv("MEMORY_SERVICE_URL", "http://memory-service:8000")
|
|
|
|
# ── Voice HA: dedicated concurrency limits (separate from generic stt/tts/llm) ──
|
|
# These control semaphores for node.{id}.voice.*.request subjects.
|
|
# Independent from MAX_CONCURRENCY so voice never starves generic inference.
|
|
VOICE_MAX_CONCURRENT_TTS = int(os.getenv("VOICE_MAX_CONCURRENT_TTS", "4"))
|
|
VOICE_MAX_CONCURRENT_LLM = int(os.getenv("VOICE_MAX_CONCURRENT_LLM", "2"))
|
|
VOICE_MAX_CONCURRENT_STT = int(os.getenv("VOICE_MAX_CONCURRENT_STT", "2"))
|
|
|
|
# Timeouts for voice subjects (milliseconds). Router uses these as defaults.
|
|
VOICE_TTS_DEADLINE_MS = int(os.getenv("VOICE_TTS_DEADLINE_MS", "3000"))
|
|
VOICE_LLM_FAST_MS = int(os.getenv("VOICE_LLM_FAST_MS", "9000"))
|
|
VOICE_LLM_QUALITY_MS = int(os.getenv("VOICE_LLM_QUALITY_MS", "12000"))
|
|
VOICE_STT_DEADLINE_MS = int(os.getenv("VOICE_STT_DEADLINE_MS", "6000"))
|