Spaces:
Sleeping
Sleeping
Download api/schemas.py from Qurrah/replyflow-rag: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/Qurrah/replyflow-rag/resolve/main/api/schemas.py
- Command line
-
hf download hf://spaces/Qurrah/replyflow-rag/api/schemas.py
-
curl -L -o schemas.py https://huggingface.co/spaces/Qurrah/replyflow-rag/resolve/main/api/schemas.py
1.16 kB
| from typing import Literal, Optional | |
| from pydantic import BaseModel, Field | |
| class IngestDocumentRequest(BaseModel): | |
| workspace_slug: str = Field(..., min_length=1) | |
| document_id: str = Field(..., min_length=1) | |
| source_url: str = Field(..., min_length=1) | |
| mime: str = Field(..., min_length=1) # validated in the route via validate_supported_mime() | |
| title: str = Field(..., min_length=1) | |
| class QueryRequest(BaseModel): | |
| query: str = Field(..., min_length=1) | |
| channel: Literal["instagram", "facebook", "test"] | |
| channel_identifier: str = Field(..., min_length=1) | |
| external_id: Optional[str] = None | |
| commenter_handle: Optional[str] = None | |
| post_caption: Optional[str] = None | |
| class QueryResponse(BaseModel): | |
| answer: str | |
| query: str | |
| route: Optional[str] = None | |
| class OnboardRequest(BaseModel): | |
| shop_domain: str = Field(..., min_length=1) | |
| access_token: str = Field(..., min_length=1) | |
| class IngestRequest(BaseModel): | |
| brand_slug: str = Field(..., min_length=1) | |
| class IngestResponse(BaseModel): | |
| status: Literal["ok", "error", "ingesting"] | |
| brand_slug: str | |
| indexed: Optional[dict] = None | |