fix:优化试题内容和样式排版

This commit is contained in:
Daniel
2026-04-18 20:20:38 +08:00
parent 15e71a9231
commit 7cb9b89cb0
644 changed files with 152784 additions and 621 deletions

View File

@@ -31,7 +31,10 @@ class MistakeBase(BaseModel):
image_url: str | None = None
category: str
difficulty: str | None = Field(None, pattern="^(easy|medium|hard)$")
note: str | None = Field(None, max_length=500)
question_content: str | None = Field(None, max_length=8000)
answer: str | None = Field(None, max_length=4000)
explanation: str | None = Field(None, max_length=8000)
note: str | None = Field(None, max_length=4000)
wrong_count: int = Field(1, ge=1)
@@ -99,3 +102,18 @@ class AiStudyPlanIn(BaseModel):
class AiStudyPlanOut(BaseModel):
plan: str
class OcrParseIn(BaseModel):
image_url: str = Field(..., max_length=1024)
prompt: str | None = Field(None, max_length=500)
class OcrParseOut(BaseModel):
text: str
title_suggestion: str | None = None
category_suggestion: str | None = None
difficulty_suggestion: str | None = None
question_content: str | None = None
answer: str | None = None
explanation: str | None = None