Spaces:
Sleeping
Sleeping
Download graph/chains/generation.py from mikail-bitik/CorrectiveRAGProject: direct link, hf CLI and curl.
- Browser
- Download file 350 Bytes
-
https://huggingface.co/spaces/mikail-bitik/CorrectiveRAGProject/resolve/main/graph/chains/generation.py
- Command line
-
hf download hf://spaces/mikail-bitik/CorrectiveRAGProject/graph/chains/generation.py
-
curl -L -o generation.py https://huggingface.co/spaces/mikail-bitik/CorrectiveRAGProject/resolve/main/graph/chains/generation.py
350 Bytes
| from langsmith import Client | |
| from langchain_deepseek import ChatDeepSeek | |
| from langchain_core.output_parsers import StrOutputParser | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| llm = ChatDeepSeek(model="deepseek-chat", temperature=0) | |
| client = Client() | |
| prompt = client.pull_prompt("rlm/rag-prompt") | |
| generation_chain = prompt | llm| StrOutputParser() |