| from pydantic_settings import BaseSettings |
|
|
|
|
| class Settings(BaseSettings): |
| |
| languagetool_url: str = "https://api.languagetool.org" |
|
|
| |
| paraphrase_model: str = "Vamsi/T5_Paraphrase_Paws" |
| summarize_model: str = "facebook/bart-large-cnn" |
| translate_en_fr_model: str = "Helsinki-NLP/opus-mt-en-fr" |
| translate_fr_en_model: str = "Helsinki-NLP/opus-mt-fr-en" |
| plagiarism_model: str = "sentence-transformers/all-MiniLM-L6-v2" |
| plagiarism_threshold: float = 0.8 |
| tone_model: str = "facebook/bart-large-mnli" |
| cowriter_model: str = "distilgpt2" |
| max_input_length: int = 1024 |
|
|
| |
| |
| groq_api_key: str = "" |
| groq_api_keys: str = "" |
| |
| |
| groq_model: str = "openai/gpt-oss-20b" |
|
|
| |
| hf_api_token: str = "" |
| hf_model: str = "openai/gpt-oss-20b:fastest" |
|
|
| |
| |
| github_pat: str = "" |
| github_model: str = "gpt-oss-120b" |
|
|
| |
| premium_promo_codes: str = "" |
|
|
| |
| admin_emails: str = "" |
|
|
| ollama_url: str = "http://localhost:11434" |
| ollama_model: str = "llama3" |
|
|
| cors_origins: list[str] = ["http://localhost:3000"] |
|
|
| |
| |
| |
| database_url: str = "sqlite:///./anovo.db" |
| jwt_secret_key: str = "change-me-in-production" |
| jwt_algorithm: str = "HS256" |
| jwt_expire_minutes: int = 60 * 24 * 7 |
|
|
| |
| |
| frontend_url: str = "http://localhost:3000" |
| reset_token_expire_minutes: int = 30 |
|
|
| |
| |
| |
| brevo_api_key: str = "" |
| email_from_name: str = "Anovo" |
|
|
| |
| |
| |
| smtp_host: str = "" |
| smtp_port: int = 587 |
| smtp_user: str = "" |
| smtp_password: str = "" |
| smtp_from: str = "no-reply@anovo.app" |
| smtp_use_tls: bool = True |
|
|
| @property |
| def smtp_configured(self) -> bool: |
| return bool(self.smtp_host) |
|
|
| class Config: |
| env_file = ".env" |
|
|
|
|
| settings = Settings() |
|
|