You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
890 B
41 lines
890 B
from pydantic import BaseModel
|
|
from typing import Union, Optional, List
|
|
|
|
|
|
class CrudChatModel(BaseModel):
|
|
is_success: bool
|
|
message: str
|
|
|
|
|
|
class AiChatModel(BaseModel):
|
|
"""
|
|
菜单表对应pydantic模型
|
|
"""
|
|
chatId: Optional[str] = None
|
|
sessionId: Optional[str] = None
|
|
sessionName: Optional[str] = None
|
|
type: Optional[str] = None
|
|
isEnd: Optional[bool] = None
|
|
isStop: Optional[bool] = None
|
|
user: Optional[int] = None
|
|
time: Optional[str] = None
|
|
content: Optional[str] = None
|
|
operate: Optional[str] = None
|
|
thumbDownReason: Optional[str] = None
|
|
file: Optional[str] = None
|
|
|
|
|
|
class ThumbOperateModel(BaseModel):
|
|
chatId: str
|
|
operate: str
|
|
thumbDownReason: str
|
|
|
|
|
|
class DownloadFile(BaseModel):
|
|
file: str
|
|
bucket: str
|
|
sessionId: str
|
|
|
|
|
|
class AiChatListModel(BaseModel):
|
|
chats: List[Union[AiChatModel, None]]
|
|
|