mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
fix: resolve create_task type error in tool_loop_agent_runner
This commit is contained in:
@@ -1053,7 +1053,9 @@ class ToolLoopAgentRunner(BaseAgentRunner[TContext]):
|
||||
"Tool execution interrupted before reading the next tool result."
|
||||
)
|
||||
|
||||
next_result_task = asyncio.create_task(anext(executor))
|
||||
async def _get_next():
|
||||
return await anext(executor)
|
||||
next_result_task = asyncio.create_task(_get_next())
|
||||
abort_task = asyncio.create_task(self._abort_signal.wait())
|
||||
self.tasks.add(next_result_task)
|
||||
self.tasks.add(abort_task)
|
||||
|
||||
Reference in New Issue
Block a user