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

finish_reason is "" instead of null #677

Open
allenhaozi opened this issue Mar 5, 2024 · 0 comments
Open

finish_reason is "" instead of null #677

allenhaozi opened this issue Mar 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@allenhaozi
Copy link

When using go sdk requests /completions, finish_reason is "" instead of null

request vllm directly

...
data: {"id":"cmpl-096176162ed84f0e85e6b5aece29f27b","object":"chat.completion.chunk","created":8209815,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"index":0,"delta":{"content":""},"finish_reason":null}]}

data: {"id":"cmpl-096176162ed84f0e85e6b5aece29f27b","object":"chat.completion.chunk","created":8209815,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"index":0,"delta":{"content":"\n"},"finish_reason":null}]}

data: {"id":"cmpl-096176162ed84f0e85e6b5aece29f27b","object":"chat.completion.chunk","created":8209815,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"index":0,"delta":{"content":""},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"total_tokens":55,"completion_tokens":43}}

Request vllm through go SDK

...
{"id":"cmpl-840b320554774957a66308b67a34ffd2","object":"","created":8210399,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"text":".","index":0,"finish_reason":"","logprobs":{"tokens":null,"token_logprobs":null,"top_logprobs":null,"text_offset":null}}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
{"id":"cmpl-840b320554774957a66308b67a34ffd2","object":"","created":8210399,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"text":"","index":0,"finish_reason":"","logprobs":{"tokens":null,"token_logprobs":null,"top_logprobs":null,"text_offset":null}}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
{"id":"cmpl-840b320554774957a66308b67a34ffd2","object":"","created":8210399,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"text":"\n","index":0,"finish_reason":"","logprobs":{"tokens":null,"token_logprobs":null,"top_logprobs":null,"text_offset":null}}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
{"id":"cmpl-840b320554774957a66308b67a34ffd2","object":"","created":8210399,"model":"public/qwen1-5-72b-chat-int4@main","choices":[{"text":"","index":0,"finish_reason":"stop","logprobs":{"tokens":null,"token_logprobs":null,"top_logprobs":null,"text_offset":null}}],"usage":{"prompt_tokens":8,"completion_tokens":20,"total_tokens":28}}

@allenhaozi allenhaozi added the bug Something isn't working label Mar 5, 2024
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

1 participant