Spaces:
Runtime error
Runtime error
Download prompt.py from wrdias/Langchain-FastAPI: direct link, hf CLI and curl.
- Browser
- Download file 575 Bytes
-
https://huggingface.co/spaces/wrdias/Langchain-FastAPI/resolve/main/prompt.py
- Command line
-
hf download hf://spaces/wrdias/Langchain-FastAPI/prompt.py
-
curl -L -o prompt.py https://huggingface.co/spaces/wrdias/Langchain-FastAPI/resolve/main/prompt.py
575 Bytes
| from langchain.prompts import PromptTemplate | |
| _DEFAULT_TEMPLATE = """The following is a friendly conversation between a human and an AI. | |
| The AI is talkative and provides lots of specific details from its context. | |
| If the AI does not know the answer to a question, it truthfully says it does not know. | |
| Relevant pieces of previous conversation: | |
| {history} | |
| (Note that you do not need to use these pieces of information if not relevant) | |
| Current conversation: | |
| Human: {input} | |
| AI:""" | |
| PROMPT = PromptTemplate( | |
| input_variables=["history", "input"], template=_DEFAULT_TEMPLATE | |
| ) | |