Spaces:
Sleeping
Sleeping
File size: 560 Bytes
4225666 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | from pydantic import BaseModel, Field
from typing import List, Optional, Literal, Annotated, Dict, Any
class RagRequest(BaseModel):
question: Annotated[str, Field(min_length=1, description="Question that user wants to ask")]
history: Annotated[Optional[List[str]], Field(default=[], description="Previously Asked Questions")]
class deleteDocs(BaseModel):
docs: Annotated[List[str], Field(min_length=1, description="List of IDs that you want to delete!")]
class DocumentType(BaseModel):
id: str
metadata: Dict[str, Any]
document: str
|