[Bugfix] Fix vLLM UsageInfo and logprobs None AssertionError with empty token_ids (#9034)

Co-authored-by: Nick Hill <nickhill@us.ibm.com>
This commit is contained in:
Chang Su
2024-10-15 15:40:43 -07:00
committed by GitHub
co-authored by Nick Hill
parent 22f8a69549
commit ba30942240
4 changed files with 140 additions and 2 deletions
+6
View File
@@ -435,6 +435,12 @@ class OpenAIServingChat(OpenAIServing):
logprobs = None
delta_text = output.text
if not delta_text and not output.token_ids and \
not previous_num_tokens[i]:
# Chunked prefill case, don't return empty chunks
continue
delta_message: Optional[DeltaMessage]
# handle streaming deltas for tools with named tool_choice