Skip to content

Commit

Permalink
update report
Browse files Browse the repository at this point in the history
  • Loading branch information
qingzhong1 committed Jan 10, 2024
1 parent 04b97e6 commit 9a8c94b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions erniebot-agent/applications/erniebot_researcher/research_team.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
from typing import List, Optional

from editor_actor_agent import EditorActorAgent
Expand Down Expand Up @@ -29,15 +30,9 @@ def __init__(
self.use_reflection = use_reflection

async def run(self, query, iterations=3):
list_reports = []
for researcher in self.research_actor_instance:
report, paragraphs = await researcher.run(query)
list_reports.append(
{
"report": report,
"paragraphs": paragraphs,
}
)
tasks_researchers = [researcher.run(query) for researcher in self.research_actor_instance]
result_researchers = await asyncio.gather(*tasks_researchers)
list_reports = [{"report": result[0], "paragraphs": result[1]} for result in result_researchers]
if self.user_agent is not None:
prompt = (
f"请你从{list_reports}个待选的多个报告草稿中,选择一个合适的报告,"
Expand Down

0 comments on commit 9a8c94b

Please sign in to comment.