Spaces:
Configuration error
Configuration error
Download backend/core/config.py from rockysreenivasa/MathTutor: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/spaces/rockysreenivasa/MathTutor/resolve/main/backend/core/config.py
- Command line
-
hf download hf://spaces/rockysreenivasa/MathTutor/backend/core/config.py
-
curl -L -o config.py https://huggingface.co/spaces/rockysreenivasa/MathTutor/resolve/main/backend/core/config.py
773 Bytes
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| model_config = SettingsConfigDict(env_file=".env", extra="ignore") | |
| anthropic_api_key: str = "" | |
| llm_provider: str = "anthropic" # anthropic | ollama | |
| llm_model: str = "claude-sonnet-4-6" | |
| llm_base_url: str = "http://localhost:11434" | |
| llm_max_tokens: int = 512 | |
| ollama_num_predict: int = 384 | |
| ollama_num_ctx: int = 2048 | |
| supabase_url: str | |
| supabase_anon_key: str | |
| supabase_service_role_key: str | |
| allowed_origins: str = "http://localhost:8501" | |
| api_base_url: str = "http://localhost:8000" | |
| def origins_list(self) -> list[str]: | |
| return [o.strip() for o in self.allowed_origins.split(",")] | |
| settings = Settings() | |