Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,15 +80,17 @@ Dữ liệu:
|
|
| 80 |
else:
|
| 81 |
return "Không có thông tin liên quan.\n."
|
| 82 |
|
| 83 |
-
def get_answer(query,
|
| 84 |
# if queries_list is None:
|
| 85 |
# queries_list = []
|
| 86 |
global queries_list
|
| 87 |
queries_list.append(query)
|
|
|
|
|
|
|
| 88 |
|
| 89 |
messages = [
|
| 90 |
{"role": "user", "parts": [{"text": "IMPORTANT: You are a super helpful, polite, Vietnamese-speaking assistant to give information of an university. If you cannot see the answer in contexts, tell user to make a more detailed question."}]},
|
| 91 |
-
{"role": "user", "parts": [{"text": augment_prompt(query=query, queries_list=
|
| 92 |
]
|
| 93 |
|
| 94 |
queries_list.append(query)
|
|
|
|
| 80 |
else:
|
| 81 |
return "Không có thông tin liên quan.\n."
|
| 82 |
|
| 83 |
+
def get_answer(query, history):
|
| 84 |
# if queries_list is None:
|
| 85 |
# queries_list = []
|
| 86 |
global queries_list
|
| 87 |
queries_list.append(query)
|
| 88 |
+
|
| 89 |
+
queries_listt = queries_list.copy()
|
| 90 |
|
| 91 |
messages = [
|
| 92 |
{"role": "user", "parts": [{"text": "IMPORTANT: You are a super helpful, polite, Vietnamese-speaking assistant to give information of an university. If you cannot see the answer in contexts, tell user to make a more detailed question."}]},
|
| 93 |
+
{"role": "user", "parts": [{"text": augment_prompt(query=query, queries_list=queries_listt)}]}
|
| 94 |
]
|
| 95 |
|
| 96 |
queries_list.append(query)
|