35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from functools import lru_cache
|
|
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_prefix="WISECLAW_",
|
|
extra="ignore",
|
|
)
|
|
|
|
env: str = "development"
|
|
db_url: str = "sqlite:///./wiseclaw.db"
|
|
admin_host: str = "127.0.0.1"
|
|
admin_port: int = 8000
|
|
model_provider: str = "local"
|
|
local_base_url: str = "http://127.0.0.1:1234"
|
|
local_model: str = "qwen3-vl-8b-instruct-mlx@5bit"
|
|
zai_base_url: str = "https://api.z.ai/api/anthropic"
|
|
zai_model: str = "glm-5"
|
|
anythingllm_base_url: str = "http://127.0.0.1:3001"
|
|
anythingllm_workspace_slug: str = "wiseclaw"
|
|
search_provider: str = "brave"
|
|
telegram_bot_token: str = Field(default="", repr=False)
|
|
brave_api_key: str = Field(default="", repr=False)
|
|
zai_api_key: str = Field(default="", repr=False)
|
|
anythingllm_api_key: str = Field(default="", repr=False)
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings()
|