Spaces:
Sleeping
Sleeping
File size: 1,102 Bytes
16d5a75 |
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, Field
class FileProcessingBody(BaseModel):
bot_id: str = Field(..., title="Bot ID associated with the file")
model_config = {
"json_schema_extra": {
"example": {
"bot_id": "bot123"
}
}
}
class FileAnalysisResponse(BaseModel):
bot_id: str = Field(..., title="Bot ID associated with the file")
file_path: str = Field(..., title="Path to the processed file")
word_count: int = Field(..., title="Number of words in the file")
image_count: int = Field(..., title="Number of images in the file")
file_type: str = Field(..., title="Type of the file (PDF, DOCX, etc.)")
class FileIngressResponse(BaseModel):
bot_id: str = Field(..., title="Bot ID associated with the file")
file_path: str = Field(..., title="Path to the processed file")
chunks_count: int = Field(..., title="Number of chunks created")
success: bool = Field(..., title="Whether the ingestion was successful")
message: str = Field("File processed and indexed successfully", title="Status message")
|