-
Notifications
You must be signed in to change notification settings - Fork 117
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
Stream occasionally skips words #24
Comments
Yep seeing the same thing |
Yes, same issue here. |
I'm seeing this issue as well. Anyone find a fix? |
I noticed this issue as well. I moved to https://github.com/MacPaw/OpenAI The transition was pretty simple, only took a few minutes, and it seems to be better overall. |
Downgrading to version 1.3.3 or using the MacPaw library seems to be the best solution for now |
Same here |
I debugged this a bit today and it seems that always the first token is disappearing from the URLsession.bytes stream in the sendMessageStream function in ChatGPTAPI.swift. When I put "for try await line in result.lines" before the "return AsyncThrowingStream ..." section all tokens are there. Only inside the "return AsyncThrowingStream closure", the first token is missing and replaced by a "delta":{"content":","}. Does anyone with more understanding of this code have any idea? Thx! |
I wonder if the issue is similar to the one fixed here: MacPaw/OpenAI#104 |
I am not exactly sure what changed, but after updating the package from version 1.3.3 to 1.4.0 I noticed that while streaming the response, words were occasionally being skipped. Downgrading to 1.3.3 resolved this issue. Might be worth looking into.
I don't have a reproducible example but about every 100 words I notice a missing word.
It's much more noticeable while generating code since the syntax error becomes evident.
The text was updated successfully, but these errors were encountered: