Spaces:
Sleeping
Sleeping
Download project/rag_agent/schemas.py from devank2000/agentic-rag: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/devank2000/agentic-rag/resolve/main/project/rag_agent/schemas.py
- Command line
-
hf download hf://spaces/devank2000/agentic-rag/project/rag_agent/schemas.py
-
curl -L -o schemas.py https://huggingface.co/spaces/devank2000/agentic-rag/resolve/main/project/rag_agent/schemas.py
871 Bytes
| from typing import List | |
| from pydantic import BaseModel, Field | |
| class QueryAnalysis(BaseModel): | |
| is_clear: bool = Field( | |
| description="Indicates if the user's question is clear and answerable." | |
| ) | |
| questions: List[str] = Field( | |
| description="List of rewritten, self-contained questions." | |
| ) | |
| clarification_needed: str = Field( | |
| description="Explanation if the question is unclear." | |
| ) | |
| starts_new_query: bool = Field( | |
| default=False, | |
| description="True if the latest message starts a separate request instead of answering the pending clarification." | |
| ) | |
| is_document_listing: bool = Field( | |
| default=False, | |
| description="True only when asking which uploaded documents are available, whether any are available, or to list the app's document library. Not for questions about document contents." | |
| ) |