good version for 算法注册

This commit is contained in:
2026-02-15 21:23:28 +08:00
parent 3c03777b97
commit 62ea5d36a5
115 changed files with 9566 additions and 1576 deletions

View File

@@ -0,0 +1,31 @@
from pydantic_settings import BaseSettings
from typing import Optional
class Settings(BaseSettings):
"""服务配置"""
# 服务基本配置
HOST: str = "0.0.0.0"
PORT: int = 8004
DEBUG: bool = True
# 服务名称
SERVICE_NAME: str = "openai-proxy"
# 日志配置
LOG_LEVEL: str = "info"
# OpenAI配置
API_KEY: Optional[str] = None
API_BASE: str = "https://api.openai.com/v1"
MODEL: str = "gpt-3.5-turbo"
TEMPERATURE: float = 0.7
MAX_TOKENS: int = 1000
class Config:
env_file = ".env"
case_sensitive = True
# 创建全局配置实例
settings = Settings()