updating for shorter simpler responses
Browse files
app.py
CHANGED
|
@@ -180,21 +180,25 @@ def nishauri(question: str, conversation_history: list[str]):
|
|
| 180 |
" Do not suggest anything that is not relevant to someone who already has HIV."
|
| 181 |
" Do not mention in the response that the person is living with HIV."
|
| 182 |
" The following information about viral loads is authoritative for any question about viral loads:"
|
| 183 |
-
" Under 50 copies/ml is low detectable level,"
|
| 184 |
-
" 50 - 199 copies/ml is low level viremia, 200 - 999 is high level viremia, and "
|
| 185 |
-
" 1000 and above is suspected treatment failure."
|
| 186 |
" A high viral load or non-suppressed viral load is any viral load above 200 copies/ml."
|
|
|
|
| 187 |
" A suppressed viral load is one below 200 copies / ml.")
|
| 188 |
|
| 189 |
question_final = (
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
| 198 |
)
|
| 199 |
|
| 200 |
completion = client.chat.completions.create(
|
|
|
|
| 180 |
" Do not suggest anything that is not relevant to someone who already has HIV."
|
| 181 |
" Do not mention in the response that the person is living with HIV."
|
| 182 |
" The following information about viral loads is authoritative for any question about viral loads:"
|
| 183 |
+
# " Under 50 copies/ml is low detectable level,"
|
| 184 |
+
# " 50 - 199 copies/ml is low level viremia, 200 - 999 is high level viremia, and "
|
| 185 |
+
# " 1000 and above is suspected treatment failure."
|
| 186 |
" A high viral load or non-suppressed viral load is any viral load above 200 copies/ml."
|
| 187 |
+
" A viral load above 1000 copies/ml suggests treatment failure."
|
| 188 |
" A suppressed viral load is one below 200 copies / ml.")
|
| 189 |
|
| 190 |
question_final = (
|
| 191 |
+
f" The user previously asked and answered the following: {context}. "
|
| 192 |
+
f" The user just asked the following question: {question}."
|
| 193 |
+
f" Please use the following content to generate a response: {source0} {source1} {source2}."
|
| 194 |
+
f" Please consider the following background information when generating a response: {background}."
|
| 195 |
+
" Keep answers brief and limited to the question that was asked."
|
| 196 |
+
" If they share a greeting, just greet them in return and ask if they have a question."
|
| 197 |
+
" Do not change the subject or address anything the user didn't directly ask about."
|
| 198 |
+
" If they respond with an acknowledgement, simply thank them."
|
| 199 |
+
" Do not discuss anything other than HIV. If they ask a question that is not about HIV, respond that"
|
| 200 |
+
" you are only able to discuss HIV."
|
| 201 |
+
" Keep the response to under 50 words and use simple language. The person asking the question does not know technical terms."
|
| 202 |
)
|
| 203 |
|
| 204 |
completion = client.chat.completions.create(
|