Execute multiple tool calls in parallel, yielding results as they complete.
(
self,
calls: list[CTPToolCall],
timeout: float | None = None,
on_tool_start: Callable[[CTPToolCall], Awaitable[None]] | None = None,
max_concurrency: int = 4,
)
| 907 | ) |
| 908 | |
| 909 | async def stream_execute_tools( |
| 910 | self, |
| 911 | calls: list[CTPToolCall], |
| 912 | timeout: float | None = None, |
| 913 | on_tool_start: Callable[[CTPToolCall], Awaitable[None]] | None = None, |
| 914 | max_concurrency: int = 4, |
| 915 | ) -> AsyncIterator[CTPToolResult]: |
| 916 | """Execute multiple tool calls in parallel, yielding results as they complete.""" |
| 917 | async for result in _stream_execute_tools( |
| 918 | self, calls, timeout, on_tool_start, max_concurrency |
| 919 | ): |
| 920 | yield result |
| 921 | |
| 922 | # ================================================================ |
| 923 | # Middleware Status |
no outgoing calls