neuralleap commited on
Commit
5308e54
1 Parent(s): 56252d1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -181,18 +181,18 @@ async def llm_response(chain,id,mode):
181
  same question again, and don't provide treatment and diagnosis ask next small and short question with yes or no format ,
182
  always don't ask same question again and again , always only ask next single small question""")
183
  try:
184
- if "Patient:" in str(question['result']) or "Patient response:" in str(question['result']):
185
  return str((str(question['result']).split("\n\n")[-1]).split(":")[-1])
186
  else:
187
  return str(question['result']).split("\n\n")[1]
188
 
189
  except:
190
- if "Patient:" in str(question['result']) or "Patient response:" in str(question['result']):
191
  return str(question['result']).split(":")[-1]
192
  else:
193
  return str(question['result'])
194
 
195
- if id==16:
196
  diagnosis_and_treatment = qa_chain(sys+chain+end_sys_prompts)
197
  diagnosis_and_treatment = str(diagnosis_and_treatment['result'])
198
 
 
181
  same question again, and don't provide treatment and diagnosis ask next small and short question with yes or no format ,
182
  always don't ask same question again and again , always only ask next single small question""")
183
  try:
184
+ if "Patient:" in str(question['result']) or "Patient response:" in str(question['result']) or "Patient Response" in str(question['result']):
185
  return str((str(question['result']).split("\n\n")[-1]).split(":")[-1])
186
  else:
187
  return str(question['result']).split("\n\n")[1]
188
 
189
  except:
190
+ if "Patient:" in str(question['result']) or "Patient response:" in str(question['result']) or "Patient Response" in str(question['result']):
191
  return str(question['result']).split(":")[-1]
192
  else:
193
  return str(question['result'])
194
 
195
+ if id==13:
196
  diagnosis_and_treatment = qa_chain(sys+chain+end_sys_prompts)
197
  diagnosis_and_treatment = str(diagnosis_and_treatment['result'])
198