forked from HSE_team/BetterCallPraskovia
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
import os
|
|
from typing import List, Optional
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
case_sensitive=True,
|
|
extra="allow"
|
|
)
|
|
|
|
APP_NAME: str = "VibeLawyerBot"
|
|
VERSION: str = "0.1.0"
|
|
DEBUG: bool = True
|
|
TELEGRAM_BOT_TOKEN: str = ""
|
|
FREE_QUESTIONS_LIMIT: int = 5
|
|
PAYMENT_AMOUNT: float = 500.0
|
|
LOG_LEVEL: str = "INFO"
|
|
LOG_FILE: str = "logs/bot.log"
|
|
|
|
YOOKASSA_SHOP_ID: str = "1230200"
|
|
YOOKASSA_SECRET_KEY: str = "test_GVoixmlp0FqohXcyFzFHbRlAUoA3B1I2aMtAkAE_ubw"
|
|
YOOKASSA_RETURN_URL: str = "https://t.me/vibelawyer_bot"
|
|
YOOKASSA_WEBHOOK_SECRET: Optional[str] = None
|
|
|
|
DEEPSEEK_API_KEY: Optional[str] = None
|
|
DEEPSEEK_API_URL: str = "https://api.deepseek.com/v1/chat/completions"
|
|
|
|
BACKEND_URL: str = "http://localhost:8001/api/v1"
|
|
|
|
ADMIN_IDS_STR: str = ""
|
|
|
|
@property
|
|
def ADMIN_IDS(self) -> List[int]:
|
|
if not self.ADMIN_IDS_STR:
|
|
return []
|
|
try:
|
|
return [int(x.strip()) for x in self.ADMIN_IDS_STR.split(",")]
|
|
except:
|
|
return []
|
|
|
|
|
|
settings = Settings() |