Skip to content

Commit 8a7396c

Browse files
committed
Updated types
1 parent 04265ba commit 8a7396c

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
"""Bidirectional streaming package for real-time audio/text conversations."""
22

3-
from .utils import log_event, log_flow, time_it_async
4-
5-
__all__ = ["log_event", "log_flow", "time_it_async"]

src/strands/experimental/bidirectional_streaming/models/bidirectional_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from ....types.content import Messages
1919
from ....types.tools import ToolSpec
20-
from ..types.bidirectional_streaming import AudioInputEvent
20+
from ..types.bidirectional_streaming import AudioInputEvent, BidirectionalStreamEvent
2121

2222
logger = logging.getLogger(__name__)
2323

@@ -31,7 +31,7 @@ class BidirectionalModelSession(abc.ABC):
3131
"""
3232

3333
@abc.abstractmethod
34-
async def receive_events(self) -> AsyncIterable[dict[str, any]]:
34+
async def receive_events(self) -> AsyncIterable[BidirectionalStreamEvent]:
3535
"""Receive events from the model in standardized format.
3636
3737
Converts provider-specific events to a common format that can be
@@ -71,7 +71,7 @@ async def send_tool_result(self, tool_use_id: str, result: dict[str, any]) -> No
7171
"""Send tool execution result to the model.
7272
7373
Formats and sends tool results according to the provider's specific protocol.
74-
Handles both successful results and error cases.
74+
Handles both successful results and error cases through the result dictionary.
7575
"""
7676
raise NotImplementedError
7777

0 commit comments

Comments
 (0)