MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / send_message_sync

Method send_message_sync

server/services/websocket_manager.py:110–118  ·  view source on GitHub ↗
(self, session_id: str, message: Dict[str, Any])

Source from the content-addressed store, hash-verified

108 # self.disconnect(session_id)
109
110 def send_message_sync(self, session_id: str, message: Dict[str, Any]) -> None:
111 try:
112 loop = asyncio.get_running_loop()
113 if loop.is_running():
114 asyncio.create_task(self.send_message(session_id, message))
115 else:
116 asyncio.run(self.send_message(session_id, message))
117 except RuntimeError:
118 asyncio.run(self.send_message(session_id, message))
119
120 async def broadcast(self, message: Dict[str, Any]) -> None:
121 for session_id in list(self.active_connections.keys()):

Callers 3

add_logMethod · 0.80
_notify_human_promptMethod · 0.80
emitMethod · 0.80

Calls 2

send_messageMethod · 0.95
runMethod · 0.45

Tested by

no test coverage detected