Download src/core/config.py from mechark/RAG-lab: direct link, hf CLI and curl.
- Browser
- Download file 487 Bytes
-
https://huggingface.co/spaces/mechark/RAG-lab/resolve/main/src/core/config.py
- Command line
-
hf download hf://spaces/mechark/RAG-lab/src/core/config.py
-
curl -L -o config.py https://huggingface.co/spaces/mechark/RAG-lab/resolve/main/src/core/config.py
487 Bytes
| from pydantic_settings import BaseSettings | |
| import os | |
| from pathlib import Path | |
| class Settings(BaseSettings): | |
| MODEL_NAME: str = "mistralai/Mistral-7B-Instruct-v0.2" | |
| # Model parameters | |
| MODEL_MAX_TOKENS: int = 512 | |
| MODEL_TEMPERATURE: float = 0.7 | |
| # Retriever parameters | |
| RETRIEVER_K_BEFORE_RERANK: int = 80 | |
| RETRIEVER_K_AFTER_RERANK: int = 4 | |
| RETRIEVER_K_CONSTANT: int = 60 | |
| HF_TOKEN: str | |
| class Config: | |
| env_file = ".env" | |
| settings = Settings() | |