Initial commit: PastPaper Master full stack

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zhao
2026-04-21 12:15:35 +07:00
commit 7a09167261
105 changed files with 24799 additions and 0 deletions

36
backend/app/config.py Normal file
View File

@@ -0,0 +1,36 @@
from pydantic_settings import BaseSettings
from functools import lru_cache
import os
class Settings(BaseSettings):
# Supabase
supabase_url: str
supabase_anon_key: str
supabase_service_role_key: str
# LLM - laozhang (gpt-4o, gpt-4o-mini)
laozhang_base_url: str = "https://api.laozhang.ai/v1"
laozhang_api_key: str = ""
# LLM - DashScope (qwen-plus)
dashscope_base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
dashscope_api_key: str = ""
# LLM - DeepSeek
deepseek_base_url: str = "https://api.deepseek.com/v1"
deepseek_api_key: str = ""
# Google Gemini (official)
google_gemini_api_key: str = ""
model_config = {
"env_file": os.path.join(os.path.dirname(__file__), "../../.env"),
"env_file_encoding": "utf-8",
"extra": "ignore",
}
@lru_cache
def get_settings() -> Settings:
return Settings()