(text: str, size: int = 18)
| 38 | return f"event: {event}\ndata: {data}\n\n".encode("utf-8") |
| 39 | |
| 40 | |
| 41 | def _stream_chunks(text: str, size: int = 18) -> list[str]: |
| 42 | content = str(text or "") |
| 43 | if not content: |
| 44 | return [""] |
| 45 | return [content[index : index + size] for index in range(0, len(content), size)] |
| 46 | |
| 47 |
nothing calls this directly
no outgoing calls
no test coverage detected