## Agents Added - Alateya: R&D, biotech, innovations - Clan (Spirit): Community spirit agent - Eonarch: Consciousness evolution agent ## Changes - docker-compose.node1.yml: Added tokens for all 3 new agents - gateway-bot/http_api.py: Added configs and webhook endpoints - gateway-bot/clan_prompt.txt: New prompt file - gateway-bot/eonarch_prompt.txt: New prompt file ## Fixes - Fixed ROUTER_URL from :9102 to :8000 (internal container port) - All 9 Telegram agents now working ## Documentation - Created PROJECT-MASTER-INDEX.md - single entry point - Added various status documents and scripts Tokens configured: - Helion, NUTRA, Agromatrix (existing) - Alateya, Clan, Eonarch (new) - Druid, GreenFood, DAARWIZZ (configured)
53 lines
1.6 KiB
Python
53 lines
1.6 KiB
Python
"""
|
|
Configuration for RAG Service
|
|
"""
|
|
|
|
import os
|
|
from typing import Literal
|
|
from pydantic import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings"""
|
|
|
|
# Service
|
|
API_HOST: str = "0.0.0.0"
|
|
API_PORT: int = 9500
|
|
|
|
# PostgreSQL + pgvector
|
|
_default_dsn = "postgresql+psycopg2://postgres:postgres@city-db:5432/daarion_city"
|
|
PG_DSN: str = os.getenv("PG_DSN", os.getenv("DATABASE_URL", _default_dsn))
|
|
|
|
# Embedding model
|
|
EMBED_MODEL_NAME: str = os.getenv("EMBED_MODEL_NAME", "BAAI/bge-m3")
|
|
EMBED_DEVICE: Literal["cuda", "cpu", "mps"] = os.getenv("EMBED_DEVICE", "cpu")
|
|
EMBED_DIM: int = int(os.getenv("EMBED_DIM", "1024")) # BAAI/bge-m3 = 1024
|
|
|
|
# Document Store
|
|
RAG_TABLE_NAME: str = os.getenv("RAG_TABLE_NAME", "rag_documents")
|
|
SEARCH_STRATEGY: Literal["approximate", "exact"] = os.getenv("SEARCH_STRATEGY", "approximate")
|
|
|
|
# Chunking
|
|
CHUNK_SIZE: int = int(os.getenv("CHUNK_SIZE", "500"))
|
|
CHUNK_OVERLAP: int = int(os.getenv("CHUNK_OVERLAP", "50"))
|
|
|
|
# Retrieval
|
|
TOP_K: int = int(os.getenv("TOP_K", "5"))
|
|
|
|
# LLM (for query pipeline)
|
|
LLM_PROVIDER: str = os.getenv("LLM_PROVIDER", "router") # router, openai, local
|
|
ROUTER_BASE_URL: str = os.getenv("ROUTER_BASE_URL", "http://router:9102")
|
|
OPENAI_API_KEY: str = os.getenv("OPENAI_API_KEY", "")
|
|
OPENAI_MODEL: str = os.getenv("OPENAI_MODEL", "gpt-4o-mini")
|
|
|
|
# NATS JetStream configuration
|
|
NATS_URL: str = os.getenv("NATS_URL", "nats://localhost:4222")
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = True
|
|
|
|
|
|
settings = Settings()
|
|
|