File size: 559 Bytes
e5c992e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from typing import List, Optional

from pydantic import BaseModel


class TxtImageScanRequest(BaseModel):
    imageId: int
    callbackUrl: str
    url: str
    languages: List[str]
    lowPriority: bool
    tasks: List[str]


class Tag(BaseModel):
    tag: str
    id: Optional[int]
    confidence: float


class Conversation(BaseModel):
    question: str
    answer: str


class ConversationCallback(BaseModel):
    id: int
    conversation: List[Conversation]
    extractTags: List[Tag]


class TxtImageScanResponse(BaseModel):
    ok: bool
    error: str