Files
campus_spider/app/config/settings.py
T

23 lines
619 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
"""项目配置,通过环境变量或项目根目录下的 .env 文件覆盖。"""
env: str = "dev"
# 火山引擎(OpenAI 兼容风格)
volcengine_api_key: str = ""
volcengine_base_url: str = "https://ark.cn-beijing.volces.com/api/v3"
# ClaudeAnthropic 风格)
anthropic_api_key: str = ""
anthropic_base_url: str = ""
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
case_sensitive=False,
extra="ignore",
)