feat: 项目初始化、完成基本流式传输和语音识别功能

This commit is contained in:
2025-06-28 19:21:46 +08:00
commit d6f9cd7aed
91 changed files with 7827 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
from enum import Enum
from pydantic import BaseModel
from typing import List
class Message(BaseModel):
role: str
content: str
class ChatRequest(BaseModel):
model: str
messages: List[Message]
class ModelType(str, Enum):
text = "text" # 文字对话
image = "image" # 文生图
audio = "audio" # 语音模型
reasoning = "reasoning" # 深度思考模型
class ModelInfo(BaseModel):
model_id: str
model_name: str
model_type: ModelType
class VendorModelList(BaseModel):
vendor: str
models: List[ModelInfo]
class VendorModelResponse(BaseModel):
data: List[VendorModelList]