Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -138,11 +138,10 @@ def respond(message, history, mom_type) :
|
|
138 |
f"Question{message}"
|
139 |
)}]
|
140 |
|
141 |
-
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
messages = [{"role": "system", "content": f"{system_prompt}\n{top_results}"}] + history + [{"role": "user", "content": message}]
|
146 |
|
147 |
|
148 |
response = client.chat_completion(
|
|
|
138 |
f"Question{message}"
|
139 |
)}]
|
140 |
|
141 |
+
if history:
|
142 |
+
messages.extend(history)
|
143 |
|
144 |
+
messages.append({"role": "user", "content": message})
|
|
|
145 |
|
146 |
|
147 |
response = client.chat_completion(
|