itsgoingd / itsgoingd/clockwork
Causing SSE streaming when Clockwork is on
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 6k
- Forks
- 333
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at LaravelHttpClientDataSource and trace how Clockwork handles the PSR-7 response body during streaming. Reproduce the issue with a non-seekable Laravel AI stream and Clockwork enabled; done means streaming completes without the seekability error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100