Spaces:
Sleeping
Sleeping
Download graph/nodes/retrieve.py from mikail-bitik/CorrectiveRAGProject: direct link, hf CLI and curl.
- Browser
- Download file 310 Bytes
-
https://huggingface.co/spaces/mikail-bitik/CorrectiveRAGProject/resolve/main/graph/nodes/retrieve.py
- Command line
-
hf download hf://spaces/mikail-bitik/CorrectiveRAGProject/graph/nodes/retrieve.py
-
curl -L -o retrieve.py https://huggingface.co/spaces/mikail-bitik/CorrectiveRAGProject/resolve/main/graph/nodes/retrieve.py
310 Bytes
| from ingestion import retriever | |
| from graph.state import GraphState | |
| from typing import Dict, Any | |
| def retrieve(state: GraphState) -> Dict[str, Any]: | |
| print("----RETRIEVE----") | |
| question = state["question"] | |
| documents = retriever.invoke(question) | |
| return {"question":question, "documents":documents} |