36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""Configuration management for Steward."""
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings loaded from environment variables or .env file."""
|
|
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
# Telegram
|
|
telegram_bot_token: str = ""
|
|
telegram_allowed_user_ids: list[int] = []
|
|
|
|
# LLM (OpenAI-compatible)
|
|
openai_api_key: str = ""
|
|
openai_base_url: str = "https://api.openai.com/v1"
|
|
openai_model: str = "gpt-4o"
|
|
openai_system_prompt: str = (
|
|
"You are Steward, a persistent, trustworthy AI-assisted personal operations platform. "
|
|
"You reduce cognitive load by observing, remembering, planning, and proposing actions. "
|
|
"You are conservative, transparent, and policy-aware. "
|
|
"Always explain your reasoning."
|
|
)
|
|
|
|
# Analysis / proposal worker
|
|
analysis_target_url: str = ""
|
|
analysis_target_api_key: str = ""
|
|
analysis_cron_hour: int = 8
|
|
analysis_cron_minute: int = 0
|
|
|
|
|
|
def get_settings() -> Settings:
|
|
"""Return application settings singleton."""
|
|
return Settings()
|