File size: 548 Bytes
47b5f0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from pydantic import BaseModel
from typing import Dict, List, Optional


class ModelResponse(BaseModel, extra="forbid"):
    text: str
    isSender: bool
    message: Optional[str] = None


class EmbeddingCreation(BaseModel, extra="forbid"):
    success: bool
    message: Optional[str] = None


class HybridSearchResponse(BaseModel):
    success: bool
    data: Optional[List[Dict]] = None
    message: Optional[str] = None


class Chunk(BaseModel):
    index: int
    text: str


class ChunksResponse(BaseModel):
    data: Dict[str, List[Chunk]]