Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,7 +104,8 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
|
|
| 104 |
response += event.delta
|
| 105 |
yield response
|
| 106 |
elif event.type == "response.completed":
|
| 107 |
-
|
|
|
|
| 108 |
response += "\n\n\n Fuentes: \n" + citations
|
| 109 |
yield response
|
| 110 |
break
|
|
|
|
| 104 |
response += event.delta
|
| 105 |
yield response
|
| 106 |
elif event.type == "response.completed":
|
| 107 |
+
response_stream = stream.get_final_response()
|
| 108 |
+
citations = extract_unique_citations_paragraph(response_stream)
|
| 109 |
response += "\n\n\n Fuentes: \n" + citations
|
| 110 |
yield response
|
| 111 |
break
|