Spaces:
Sleeping
Sleeping
Download src/application/dto/ask_question_dto.py from Loren/rag-backend-api: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/spaces/Loren/rag-backend-api/resolve/main/src/application/dto/ask_question_dto.py
- Command line
-
hf download hf://spaces/Loren/rag-backend-api/src/application/dto/ask_question_dto.py
-
curl -L -o ask_question_dto.py https://huggingface.co/spaces/Loren/rag-backend-api/resolve/main/src/application/dto/ask_question_dto.py
604 Bytes
| from dataclasses import dataclass | |
| from typing import List, Optional | |
| class AskQuestionCommand: | |
| question: str | |
| top_k: int = 3 | |
| use_mmr: bool = False | |
| lambda_mult: Optional[float] = None | |
| similarity_threshold: float = 0.4 | |
| trace_name: str = "chatbot-search" | |
| user_id: str = "anonymous" | |
| class ChunkView: | |
| id: str | |
| content: str | |
| score: Optional[float] | |
| title: Optional[str] | |
| author: Optional[str] | |
| class AskQuestionResult: | |
| answer: str | |
| chunks: List[ChunkView] | |
| trace_id: Optional[str] | |