Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -339,13 +339,15 @@ def chat(question, manual, history, liked):
|
|
339 |
final_response = ""
|
340 |
for chunk in chat_gpt_nofn(prompt=prompt, history=conv):
|
341 |
final_response += chunk
|
342 |
-
|
|
|
|
|
343 |
"question": question,
|
344 |
-
"response":
|
345 |
"manual": manual,
|
346 |
"point_id": uuid.uuid4().hex
|
347 |
}
|
348 |
-
|
349 |
conv.append({"role": "user", "content": prompt})
|
350 |
conv.append({"role": "assistant", "content": final_response})
|
351 |
print("Answer:--- %s seconds ---" % (time.time() - start_time))
|
|
|
339 |
final_response = ""
|
340 |
for chunk in chat_gpt_nofn(prompt=prompt, history=conv):
|
341 |
final_response += chunk
|
342 |
+
yield "", history + [(question, final_response)]
|
343 |
+
|
344 |
+
last_interaction.value = {
|
345 |
"question": question,
|
346 |
+
"response": final_response,
|
347 |
"manual": manual,
|
348 |
"point_id": uuid.uuid4().hex
|
349 |
}
|
350 |
+
|
351 |
conv.append({"role": "user", "content": prompt})
|
352 |
conv.append({"role": "assistant", "content": final_response})
|
353 |
print("Answer:--- %s seconds ---" % (time.time() - start_time))
|