Replace single report type with composable analysis: depth levels (basic/standard/full) + focus area multi-select (psychology, business, marketing, content, audience, sentiment). Multi-step inline keyboard flow guides users through selection. - i18n: English + Russian, auto-detect from Telegram, /lang override - AI providers: Anthropic + OpenRouter via AIClient abstraction - Telegram Stars payments with per-depth pricing and free trial - SQLite (aiosqlite) for users, analyses, payments tracking - User middleware for auto-registration and language detection - Report persistence: save .md locally, offer file download - New commands: /features, /prices, /lang - Composable prompt system: depth modifiers + focus area fragments
30 lines
763 B
Python
30 lines
763 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
bot_token: str
|
|
telegram_api_id: int
|
|
telegram_api_hash: str
|
|
telegram_phone: str
|
|
anthropic_api_key: str
|
|
claude_model: str = "claude-opus-4-6"
|
|
|
|
openrouter_api_key: str = ""
|
|
available_models: str = "claude-haiku-4-5"
|
|
|
|
price_basic: int = 50
|
|
price_standard: int = 100
|
|
price_full: int = 200
|
|
free_analyses: int = 1
|
|
|
|
db_path: str = "/app/data/bot.db"
|
|
reports_dir: str = "/app/data/reports"
|
|
|
|
model_config = {"env_file": ".env", "env_file_encoding": "utf-8", "extra": "ignore"}
|
|
|
|
@property
|
|
def models_list(self) -> list[str]:
|
|
return [m.strip() for m in self.available_models.split(",") if m.strip()]
|
|
|
|
|
|
settings = Settings()
|