alexliap commited on
Commit
48686d5
·
unverified ·
1 Parent(s): c93f7a5

bug fix for clarifiaction question

Browse files
Files changed (1) hide show
  1. app.py +10 -4
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
- final_report, refs = (
9
- final_report.split("\n\n## References:\n\n")[0],
10
- final_report.split("\n\n## References:\n\n")[1],
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