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

OpenAI-api Streaming: closing http socket does not cancel generation #4521

Closed
1 task done
IkariDevGIT opened this issue Nov 9, 2023 · 1 comment
Closed
1 task done
Labels
bug Something isn't working

Comments

@IkariDevGIT
Copy link

Describe the bug

Streaming: closing http socket does not cancel generation like when the old api was around

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

enable openai-api extension, use api with streaming, close socket, continues generating

Screenshot

No response

Logs

no logs

System Info

win 10
msi
3070
local
frontend: SillyTavern
@IkariDevGIT IkariDevGIT added the bug Something isn't working label Nov 9, 2023
@oobabooga
Copy link
Owner

Afaik, SSE is uni-directional so the server doesn't know about the client disconnection. But it is possible to stop the generation by posting to /v1/internal/stop-generation:

  curl -X 'POST' \
    -H "Content-Type: application/json" \
    -d '' \
    'https://127.0.0.1:5000/v1/internal/stop-generation'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants