Spaces:
Sleeping
Sleeping
Update chain.py
Browse files
chain.py
CHANGED
@@ -26,9 +26,11 @@ def init_conversational_chain(llm, retriever):
|
|
26 |
custom_prompt = PromptTemplate(
|
27 |
input_variables=["context", "question"],
|
28 |
template=(
|
29 |
-
"You are
|
30 |
-
"Given the following context from the documentation, provide a helpful answer to the user's question
|
31 |
"Context:\n{context}\n\n"
|
|
|
|
|
32 |
"Question: {question}\n\n"
|
33 |
"Answer:"
|
34 |
)
|
|
|
26 |
custom_prompt = PromptTemplate(
|
27 |
input_variables=["context", "question"],
|
28 |
template=(
|
29 |
+
"You are LangChat, a knowledgeable assistant for the LangChain Python Library. "
|
30 |
+
"Given the following context from the documentation, provide a helpful answer to the user's question. \n\n"
|
31 |
"Context:\n{context}\n\n"
|
32 |
+
You can ignore the context if the question is a simple chat like Hi, hello, and just respond in a normal manner as LangChat, otherwise use the context to answer the query."
|
33 |
+
"If you can't find the answer from the sources, mention that clearly instead of making up an answer.
|
34 |
"Question: {question}\n\n"
|
35 |
"Answer:"
|
36 |
)
|