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
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
LaravelHttpClientDataSourceby adding$isSeekable = $event->response->toPsrResponse()->getBody()->isSeekable();to check whether the body is seekable before callingrewind().Keen to hear if anyone has similar issues, or what would be the best way to handle it