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

[Bugfix] API stream returning two stops #3450

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

dylanwhawk
Copy link
Contributor

Fixes #2266 by adapting #2267 to the current main

Example output:

data: {"id":"cmpl-64c697d392a840159142ea964ffe98cf","created":1710629390,"model":"facebook/opt-125m","choices":[{"index":0,"text":" and","logprobs":null,"finish_reason":null}],"usage":null}

data: {"id":"cmpl-64c697d392a840159142ea964ffe98cf","created":1710629390,"model":"facebook/opt-125m","choices":[{"index":0,"text":" I","logprobs":null,"finish_reason":"length"}],"usage":{"prompt_tokens":5,"total_tokens":10,"completion_tokens":5}}

data: [DONE]

@simon-mo simon-mo self-assigned this Mar 17, 2024
Copy link
Collaborator

@simon-mo simon-mo left a comment

Choose a reason for hiding this comment

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

please add a test for this behavior in tests enetrypoints

@dylanwhawk
Copy link
Contributor Author

Test coverage added to test_completion_streaming and test_chat_streaming (cc @simon-mo)

@simon-mo simon-mo merged commit 0b4997e into vllm-project:main Mar 25, 2024
24 checks passed
xjpang pushed a commit to xjpang/vllm that referenced this pull request Mar 31, 2024
Co-authored-by: Dylan Hawk <dylanwawk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

openai v1/completions api completion_stream_generator return two stops
2 participants