Skip to content

Causing SSE streaming when Clockwork is on #757

Description

@khtatfm

Hi, I am building a chatbot using the Laravel AI SDK, and our project has Clockwork installed. We are using Filament and Livewire. When streaming, I get: Stream is not seekable at /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php:227.

Laravel AI returns a non-seekable PSR-7 body, so Clockwork's $responseBody->rewind() call is interfering with the AI streaming.

I had to override LaravelHttpClientDataSource by adding $isSeekable = $event->response->toPsrResponse()->getBody()->isSeekable(); to check whether the body is seekable before calling rewind().

Keen to hear if anyone has similar issues, or what would be the best way to handle it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions