Spaces:
Sleeping
Sleeping
Download src/domain/model/rag_models.py from Loren/rag-backend-api: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/spaces/Loren/rag-backend-api/resolve/main/src/domain/model/rag_models.py
- Command line
-
hf download hf://spaces/Loren/rag-backend-api/src/domain/model/rag_models.py
-
curl -L -o rag_models.py https://huggingface.co/spaces/Loren/rag-backend-api/resolve/main/src/domain/model/rag_models.py
469 Bytes
| from dataclasses import dataclass | |
| from typing import Optional | |
| class Document: | |
| id: str | |
| content: str | |
| score: Optional[float] | |
| title: Optional[str] = None | |
| author: Optional[str] = None | |
| class Answer: | |
| text: str | |
| class GenerationResult: | |
| text: str | |
| prompt: str | |
| input_tokens: int | |
| output_tokens: int | |
| thoughts_tokens: int | |
| finish_reason: Optional[str] = None | |