Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,20 +8,15 @@ from langchain.chains import ChatVectorDBChain
|
|
8 |
from query_data import get_chain
|
9 |
from response import get_response
|
10 |
|
11 |
-
_template = """
|
12 |
-
|
13 |
-
Chat History:
|
14 |
-
{chat_history}
|
15 |
-
Follow Up Input: {question}
|
16 |
-
Standalone question:"""
|
17 |
-
CONDENSE_QUESTION_PROMPT = PromptTemplate.from_template(_template)
|
18 |
|
19 |
template = """You are an AI psychotherapist. You are empathic and encourage humans to share. If asked for information,
|
20 |
-
provide it and then gently inquire if they want to talk about it. If you don't know the answer, just say
|
21 |
-
|
22 |
-
and well being."""
|
23 |
|
24 |
-
|
25 |
|
26 |
class ChatWrapper:
|
27 |
|
|
|
8 |
from query_data import get_chain
|
9 |
from response import get_response
|
10 |
|
11 |
+
_template = """Paraphrase the message and encourage to share more"""
|
12 |
+
PARAPHRASE_MESSAGE_PROMPT= PromptTemplate.from_template(_template)
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
template = """You are an AI psychotherapist. You are empathic and encourage humans to share. If asked for information,
|
15 |
+
provide it and then gently inquire if they want to talk about it. If you don't know the answer, just say
|
16 |
+
"Hmm, I'm not sure." Don't try to make up an answer. If the question is not about mental health or resources,
|
17 |
+
politely inform them that you are tuned to only answer questions about mental health and well being."""
|
18 |
|
19 |
+
Message: {message}
|
20 |
|
21 |
class ChatWrapper:
|
22 |
|