Download rag/app/consts/api.py from Zamax14/api_rag: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/spaces/Zamax14/api_rag/resolve/main/rag/app/consts/api.py
- Command line
-
hf download hf://spaces/Zamax14/api_rag/rag/app/consts/api.py
-
curl -L -o api.py https://huggingface.co/spaces/Zamax14/api_rag/resolve/main/rag/app/consts/api.py
1.23 kB
| # ============================================================================== | |
| # Project Name: RAG LLM | |
| # Script Name: api.py | |
| # Authors: Abraham Sánchez, Ulises Moya, Alejandro Zarate | |
| # Description: | |
| # This Python application provides an API service that retrieves answers to | |
| # user queries based on the given context. | |
| # | |
| # License: MIT | |
| # ============================================================================== | |
| from typing import Final | |
| TITLE: Final[str] = 'REST API RAG LLM' | |
| DESCRIPTION: Final[str] = ( | |
| 'This API was developed by the Instituto de Información Estadística y Geográfica del Estado de Jalisco. ' | |
| 'It is built using FastAPI and is designed to retrieve answers based on user queries and context. ' | |
| 'Responses are generated using an LLM model that utilizes Astra DB when documents are available.' | |
| ) | |
| DOC_ANSWER: Final[str] = 'Answer generated based on the user query.' | |
| DOC_ANSWER_RESPONSE: Final[str] = 'Response from the REST API.' | |
| DOC_ADD_COLLECTION: Final[str] = 'Add a document file to Astra DB.' | |
| DOC_ANSWER_DETAILS: Final[str] = 'Message indicating any error messages encountered during execution.' | |
| DOC_QUERY_DB: Final[str] = 'Generate a response from a user query using the LLM model.' |