Files
XingHuo/app/config/settings.py
T

38 lines
1013 B
Python
Raw Normal View History

"""环境配置(从 .env 读取,见 .env.example)。"""
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
app_env: str = "development"
mysql_host: str = "127.0.0.1"
mysql_port: int = 3306
mysql_database: str = "jinrong_agent"
mysql_core_database: str = "jinrong_core"
mysql_user: str = "root"
mysql_password: str = ""
redis_url: str = "redis://127.0.0.1:6379/0"
neo4j_uri: str = "bolt://localhost:7687"
neo4j_user: str = "neo4j"
neo4j_password: str = ""
milvus_uri: str = "./data/milvus.db"
ollama_base_url: str = "http://127.0.0.1:11434"
embed_model: str = "bge-m3"
deepseek_api_key: str = ""
deepseek_base_url: str = "https://api.deepseek.com"
jwt_dev_secret: str = "change-me-in-dev-only"
jwt_dev_algorithm: str = "HS256"
jwt_dev_expire_hours: int = 8
settings = Settings()