Send a streaming update in SSE protocol format. Args: event_type: The type of event (e.g., 'start_of_workflow', 'tool_call') data: The event payload data
(self, event_type: str, data: dict)
| 34 | self.stream_queue = stream_queue |
| 35 | |
| 36 | async def update(self, event_type: str, data: dict): |
| 37 | """ |
| 38 | Send a streaming update in SSE protocol format. |
| 39 | |
| 40 | Args: |
| 41 | event_type: The type of event (e.g., 'start_of_workflow', 'tool_call') |
| 42 | data: The event payload data |
| 43 | """ |
| 44 | if self.stream_queue: |
| 45 | try: |
| 46 | stream_message = { |
| 47 | "event": event_type, |
| 48 | "data": data, |
| 49 | } |
| 50 | await self.stream_queue.put(stream_message) |
| 51 | except Exception as e: |
| 52 | logger.warning(f"Failed to send stream update: {e}") |
| 53 | |
| 54 | async def start_workflow(self, user_input: str) -> str: |
| 55 | """ |
no test coverage detected