完善训练链路接口与PDF下载
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
VisitEnvironment = Literal["outpatient", "emergency", "ward"]
|
||||
AgeGroup = Literal["child", "youth", "middle_aged", "elderly"]
|
||||
EducationLevel = Literal["primary_or_below", "secondary", "higher"]
|
||||
Personality = Literal["calm", "anxious", "impatient", "cooperative", "suspicious"]
|
||||
|
||||
|
||||
class ConfigOption(BaseModel):
|
||||
"""训练配置选项:用于前端渲染单个可选项。"""
|
||||
@@ -12,14 +19,14 @@ class ConfigOption(BaseModel):
|
||||
class PatientConfig(BaseModel):
|
||||
"""病人初始化配置:控制 AI 病人的就诊场景、年龄段、文化程度和性格。"""
|
||||
|
||||
visit_environment: str = "outpatient"
|
||||
age_group: str = "youth"
|
||||
education_level: str = "higher"
|
||||
personality: str = "calm"
|
||||
visit_environment: VisitEnvironment = "outpatient"
|
||||
age_group: AgeGroup = "youth"
|
||||
education_level: EducationLevel = "higher"
|
||||
personality: Personality = "calm"
|
||||
|
||||
|
||||
class TrainingConfigOptionsResponse(BaseModel):
|
||||
"""训练配置响应:返回默认配置和全部可选项。"""
|
||||
"""训练配置响应:返回推荐配置和全部可选项。"""
|
||||
|
||||
case_id: int
|
||||
recommended: PatientConfig
|
||||
|
||||
Reference in New Issue
Block a user