Files

24 lines
589 B
Python
Raw Permalink Normal View History

2026-07-21 15:43:39 +08:00
"""
自动生成的 Pydantic 模型 — doubao
来源: config/workers/doubao/
"""
from __future__ import annotations
from typing import Any, Optional
from pydantic import BaseModel, Field
class AnalyzePostRequest(BaseModel):
"""分析图片内容 — 请求体"""
image_base64: str = Field(...)
prompt: str = Field(...)
class AnalyzePostResponse(BaseModel):
"""分析图片内容 — 响应体"""
result: str = Field(...)
error: Optional[str] = Field(default='')
# 所有响应模型的联合类型
DoubaoResponse = AnalyzePostResponse