deepseek_volcengine.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from pydantic import Field
  2. from pydantic_settings import BaseSettings, SettingsConfigDict
  3. class DeepSeekVolcengineConfig(BaseSettings):
  4. """DeepSeek 火山引擎 Ark API 配置"""
  5. api_key: str = Field(
  6. default="ark-0d5dd17a-35a1-48dc-817a-f2f69c743acb-701ce",
  7. description="火山引擎 Ark API Key",
  8. )
  9. base_url: str = Field(
  10. default="https://ark.cn-beijing.volces.com/api/v3",
  11. description="火山引擎 Ark API 地址",
  12. )
  13. pro_model: str = Field(
  14. default="ep-20260625202225-w4vkd", description="DeepSeek V4-Pro (火山引擎)"
  15. )
  16. reasoner_model: str = Field(
  17. default="ep-20260625202225-w4vkd", description="DeepSeek 推理模型 (火山引擎)"
  18. )
  19. chat_model: str = Field(
  20. default="ep-20260625202225-w4vkd", description="DeepSeek 对话模型 (火山引擎)"
  21. )
  22. model_config = SettingsConfigDict(
  23. env_prefix="DEEPSEEK_VOLCENGINE_",
  24. env_file=".env",
  25. case_sensitive=False,
  26. extra="ignore",
  27. )
  28. def get_model_map(self) -> dict:
  29. """获取模型映射字典,兼容旧代码"""
  30. return {
  31. "DeepSeek-R1": self.reasoner_model,
  32. "DeepSeek-V3": self.chat_model,
  33. }