File size: 1,346 Bytes
13ba451
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from pydantic import BaseModel
from typing import List

class ListUserChat(BaseModel):
    id: int
    email: str
    chat_name: str

class ChatDetail(BaseModel):
    id: int
    chat_id: int
    question: str
    answer: str
    data_relevant: str
    source_file: str

class ChatDetailById(BaseModel):
    id: int
    data_relevant: str
    source_file: str

class ListChatDeTail(BaseModel):
    detail_chat: List[ChatDetail]

class UserInfoListResponse(BaseModel):
    chat: List[ListUserChat]

class Message(BaseModel):
    message: str
   
class CheckModel(BaseModel):
    check: bool

class ResponseRenderChatHistory(BaseModel):
    status: int
    data: UserInfoListResponse

class ResponseChatDetailById(BaseModel):
    status: int
    data: ChatDetailById
class ResponseLoadChatHistory(BaseModel):
    status: int
    data: ListChatDeTail

class ResponseEditChat(BaseModel):
    status: int
    data: Message

class ResponseDeleteChat(BaseModel):
    status: int
    data: Message

class ResponseCreateChat(BaseModel):
    status: int
    data: Message

class ResponseStopChat(BaseModel):
    status: int
    data: Message
class ResponseDeleteChatDetailById(BaseModel):
    status: int
    data: CheckModel

class ReponseError(BaseModel):
    status: int
    data: Message