21 lines
579 B
Python
21 lines
579 B
Python
|
|
from pydantic import BaseModel
|
||
|
|
|
||
|
|
|
||
|
|
class LLMTestRequest(BaseModel):
|
||
|
|
"""LLM 测试入参:用于快速模型和 reason 模型耗时验证。"""
|
||
|
|
|
||
|
|
message: str = "请用一句话说明医疗问诊训练 Demo 的用途。"
|
||
|
|
|
||
|
|
|
||
|
|
class LLMTestResponse(BaseModel):
|
||
|
|
"""LLM 测试响应:返回模型名、首 token 时间和总耗时。"""
|
||
|
|
|
||
|
|
model: str
|
||
|
|
first_token_ms: int | None = None
|
||
|
|
total_latency_ms: int
|
||
|
|
stream: bool
|
||
|
|
mock_mode: bool = False
|
||
|
|
fallback_used: bool = False
|
||
|
|
thinking_enabled: bool | None = None
|
||
|
|
reasoning_effort: str | None = None
|