$message, 'data' => $payload, ]); } public function isStreamStart(): bool { return $this->type === self::TYPE_STREAM_START; } public function isStreamEnd(): bool { return $this->type === self::TYPE_STREAM_END; } public function isTextStart(): bool { return $this->type === self::TYPE_TEXT_START; } public function isTextDelta(): bool { return $this->type === self::TYPE_TEXT_DELTA; } public function isTextComplete(): bool { return $this->type === self::TYPE_TEXT_COMPLETE; } public function isThinkingStart(): bool { return $this->type === self::TYPE_THINKING_START; } public function isThinkingDelta(): bool { return $this->type === self::TYPE_THINKING_DELTA; } public function isThinkingComplete(): bool { return $this->type === self::TYPE_THINKING_COMPLETE; } public function isToolCall(): bool { return $this->type === self::TYPE_TOOL_CALL; } public function isToolResult(): bool { return $this->type === self::TYPE_TOOL_RESULT; } public function isError(): bool { return $this->type === self::TYPE_ERROR; } }