Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
•
eaed23c
1
Parent(s):
e3ea91a
Update app.py
Browse files
app.py
CHANGED
@@ -158,14 +158,15 @@ class LangChain_Document_QA:
|
|
158 |
except:
|
159 |
pass
|
160 |
|
161 |
-
prompt = f"""Analyse the patient json If asked for information take it from {patient_details}\
|
162 |
-
you first get patient details : <get name,age,gender,contact,address from patient> if not match patient json information start new chat else match patient
|
163 |
-
|
164 |
-
|
165 |
-
if
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
169 |
"""
|
170 |
response = openai.Completion.create(
|
171 |
model="text-davinci-003",
|
|
|
158 |
except:
|
159 |
pass
|
160 |
|
161 |
+
prompt = f"""Analyse the patient json If asked for information take it from {patient_details} \
|
162 |
+
you first get patient details : <get name,age,gender,contact,address from patient> if not match patient json information start new chat else match patient \
|
163 |
+
json information ask previous: <description,symptoms,diagnosis,treatment talk about patient> As an empathic AI Mental Healthcare Doctor Chatbot, provide effective solutions to patients' mental health concerns. \
|
164 |
+
first start the conversation ask existing patient or new patient. if new patient get name,age,gender,contact,address from the patient and start. \
|
165 |
+
if existing customer get name,age,gender,contact,address details and start the chat about existing issues and current issues. \
|
166 |
+
if patient say thanking tone message to end the conversation with a thanking greeting when the patient expresses gratitude. \
|
167 |
+
Chat History:['''{history}''']
|
168 |
+
Patient: ['''{text}''']
|
169 |
+
Perform as Mental Healthcare Doctor Chatbot
|
170 |
"""
|
171 |
response = openai.Completion.create(
|
172 |
model="text-davinci-003",
|