feat: optimize the format convert
This commit is contained in:
@@ -40,11 +40,21 @@ class ImageOCRRequest(BaseModel):
|
||||
class ImageOCRResponse(BaseModel):
|
||||
"""Response body for image OCR endpoint."""
|
||||
|
||||
latex: str = Field("", description="LaTeX representation of the content")
|
||||
latex: str = Field("", description="LaTeX representation of the content (empty if mixed content)")
|
||||
markdown: str = Field("", description="Markdown representation of the content")
|
||||
mathml: str = Field("", description="MathML representation (empty if no math detected)")
|
||||
mathml: str = Field("", description="Standard MathML representation (empty if mixed content)")
|
||||
mml: str = Field("", description="XML MathML with mml: namespace prefix (empty if mixed content)")
|
||||
layout_info: LayoutInfo = Field(default_factory=LayoutInfo)
|
||||
recognition_mode: str = Field(
|
||||
"", description="Recognition mode used: mixed_recognition or formula_recognition"
|
||||
)
|
||||
recognition_mode: str = Field("", description="Recognition mode used: mixed_recognition or formula_recognition")
|
||||
|
||||
|
||||
class LatexToOmmlRequest(BaseModel):
|
||||
"""Request body for LaTeX to OMML conversion endpoint."""
|
||||
|
||||
latex: str = Field(..., description="Pure LaTeX formula (without $ or $$ delimiters)")
|
||||
|
||||
|
||||
class LatexToOmmlResponse(BaseModel):
|
||||
"""Response body for LaTeX to OMML conversion endpoint."""
|
||||
|
||||
omml: str = Field("", description="OMML (Office Math Markup Language) representation")
|
||||
|
||||
Reference in New Issue
Block a user