19 lines
393 B
Python
19 lines
393 B
Python
from typing import Literal
|
|
|
|
from pydantic import BaseModel
|
|
|
|
ChunkingStrategyType = Literal["token", "question"]
|
|
|
|
VALID_CHUNKING_STRATEGIES = frozenset({"token", "question"})
|
|
|
|
|
|
class IngestRequest(BaseModel):
|
|
strategy: ChunkingStrategyType = "token"
|
|
|
|
|
|
class IngestResponse(BaseModel):
|
|
document_id: str
|
|
chunk_count: int
|
|
filename: str
|
|
strategy: ChunkingStrategyType = "token"
|