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

perf: update library tisfeng/OpenAI, enable to cancel OpenAI stream query #577

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

tisfeng
Copy link
Owner

@tisfeng tisfeng commented Jun 3, 2024

Close #560

Now we can cancel OpenAI stream request when clicking stop button.

feat: implement cancellable in tisfeng/OpenAI#1

@tisfeng
Copy link
Owner Author

tisfeng commented Jun 5, 2024

Please review this PR.

@Jerry23011
Copy link
Collaborator

I'm testing with Built-in AI tranlsation, and from my web debugging proxy, the streaming didn't stop after I pressed stop?

@Jerry23011
Copy link
Collaborator

2024-06-06.17.23.08.mov

@tisfeng
Copy link
Owner Author

tisfeng commented Jun 6, 2024

ok, I will check it later.

@tisfeng
Copy link
Owner Author

tisfeng commented Jun 6, 2024

During the previous git merge, the crucial control.cancel() was mistakenly deleted, resulting in the request not being truly canceled.

Copy link
Collaborator

@Jerry23011 Jerry23011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it works. LGTM

Copy link
Collaborator

@AkaShark AkaShark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisfeng tisfeng merged commit 04c926f into dev Jun 6, 2024
5 checks passed
@tisfeng tisfeng deleted the enable-cancel-chatsStream branch June 6, 2024 16:04
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

Successfully merging this pull request may close these issues.

3 participants