def _construct_message(self, data: str, event: Optional[str] = None) -> Message:
        """Constructs message payload.

        Args:
            data: The data payload.
            event: The event name.
        """
        chunk = ServerSentEvent(data=data, event=event)
        return {
            "type": "http.response.body",
            "body": ensure_bytes(chunk, None),
            "more_body": True,
        }
Constructs message payload.

        Args:
            data: The data payload.
            event: The event name.
        
lanarky/adapters/langchain/callbacks.py