Spaces:
Sleeping
Sleeping
bug fix for clarifiaction question
Browse files
app.py
CHANGED
|
@@ -5,10 +5,16 @@ from agent import query_agent
|
|
| 5 |
# Simulate your async agent interaction
|
| 6 |
async def interact_with_agent(prompt: str):
|
| 7 |
final_report = await query_agent(research_query=prompt)
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
final_report.split("\n\n## References:\n\n")[
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
return final_report, refs
|
| 13 |
|
| 14 |
|
|
|
|
| 5 |
# Simulate your async agent interaction
|
| 6 |
async def interact_with_agent(prompt: str):
|
| 7 |
final_report = await query_agent(research_query=prompt)
|
| 8 |
+
|
| 9 |
+
if len(final_report.split("\n\n## References:\n\n")) == 1:
|
| 10 |
+
final_report = final_report.split("\n\n## References:\n\n")[0]
|
| 11 |
+
refs = ""
|
| 12 |
+
elif len(final_report.split("\n\n## References:\n\n")) > 1:
|
| 13 |
+
final_report, refs = (
|
| 14 |
+
final_report.split("\n\n## References:\n\n")[0],
|
| 15 |
+
final_report.split("\n\n## References:\n\n")[1],
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
return final_report, refs
|
| 19 |
|
| 20 |
|