Spaces:
Sleeping
Sleeping
Download models.py from ayushg16/rag_optimizer: direct link, hf CLI and curl.
- Browser
- Download file 396 Bytes
-
https://huggingface.co/spaces/ayushg16/rag_optimizer/resolve/main/models.py
- Command line
-
hf download hf://spaces/ayushg16/rag_optimizer/models.py
-
curl -L -o models.py https://huggingface.co/spaces/ayushg16/rag_optimizer/resolve/main/models.py
396 Bytes
| from openenv.core.env_server import Action, Observation, State | |
| class RagOptimizerAction(Action): | |
| chunk_size: int | |
| top_k: int | |
| class RagOptimizerObservation(Observation): | |
| retrieval_score: float | |
| message: str | |
| reward: float = 0.0 | |
| done: bool = False | |
| class RagOptimizerState(State): | |
| current_chunk_size: int = 500 | |
| current_top_k: int = 3 | |
| target_score: float = 0.85 |