Skip to content

WebSocketProtocol

autogen.agentchat.realtime.experimental.websockets.WebSocketProtocol #

Bases: Protocol

WebSocket protocol for sending and receiving JSON data modelled after FastAPI's WebSocket.

send_json async #

send_json(data, mode='text')
Source code in autogen/agentchat/realtime/experimental/websockets.py
async def send_json(self, data: Any, mode: str = "text") -> None: ...

receive_json async #

receive_json(mode='text')
Source code in autogen/agentchat/realtime/experimental/websockets.py
async def receive_json(self, mode: str = "text") -> Any: ...

receive_text async #

receive_text()
Source code in autogen/agentchat/realtime/experimental/websockets.py
async def receive_text(self) -> str: ...

iter_text #

iter_text()
Source code in autogen/agentchat/realtime/experimental/websockets.py
def iter_text(self) -> AsyncIterator[str]: ...