Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] stop button doesn't work #114

Closed
Geczy opened this issue May 14, 2023 · 12 comments
Closed

[bug] stop button doesn't work #114

Geczy opened this issue May 14, 2023 · 12 comments

Comments

@Geczy
Copy link

Geczy commented May 14, 2023

press stop while it's generating, and it will keep generating

@enricoros
Copy link
Owner

Thanks for the report. Will look into it.

@Geczy
Copy link
Author

Geczy commented May 17, 2023

@enricoros any ideas what's causing it or how to fix?

@enricoros
Copy link
Owner

@Geczy I can't tell. Is it the button that is grayed out, or do you click and nothing happens?
Any message on the console (F12, Esc on Chrome)? What device/Browser are you on?

@Geczy
Copy link
Author

Geczy commented May 18, 2023

i click and the chat continues writing

you cant tell? did you try it yourself?

@enricoros
Copy link
Owner

Works for me, that's why I'm asking details.

@Geczy
Copy link
Author

Geczy commented May 19, 2023

please see here for more details. its ok if my api key is leaked, i revoked it after recording this

https://jam.dev/c/809bfcae-8b86-4277-9098-ab55b285c76c

@enricoros
Copy link
Owner

Thanks for sharing this, I was wondering how to reproduce. I see something strange going on with the network requests. I'll try to investigate despite not being on Mac.

@Geczy
Copy link
Author

Geczy commented May 22, 2023

@enricoros any ideas about that yet? is there anything else i can try? different browser maybe?

@Geczy
Copy link
Author

Geczy commented May 22, 2023

i tested it in firefox and it does work there to stop ! so it looks like a chrome issue?

@enricoros
Copy link
Owner

I know that chrome works on windows. Hmmm. On the other hand chrome on macOS also does a poor job of speech recognition, to the point i disabled the whole feature. Very weird.
Thanks for saying it works on Firefox!

@githubmilind
Copy link

I can see it is working on Windows Chrome. Is it fixed?

enricoros added a commit that referenced this issue Jul 5, 2023
Thanks to the Vercel team (@jridgewell), an interruption of the stream on the client
side will lead to the cancellation of the TransformStream on the servers side, which
in turns cancels the open fetch() to the upstream. This was a long needed change and
we are happy to report it works well.

Related: #114
 - vercel/ai#90
 - vercel/edge-runtime#428
 - trpc/trpc#4586 (enormous thanks to the tRPC team to issue
   a quick release as well)
@enricoros
Copy link
Owner

Correct, fixed long ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants