File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -573,7 +573,8 @@ async def chat_completion_stream_generator(
573
573
if finish_reason_sent [i ]:
574
574
continue
575
575
576
- if request .logprobs and request .top_logprobs is not None :
576
+ if request .logprobs and request .top_logprobs is not None \
577
+ and output .token_ids :
577
578
assert output .logprobs is not None , (
578
579
"Did not output logprobs" )
579
580
logprobs = self ._create_chat_logprobs (
Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ async def completion_stream_generator(
358
358
# Chunked prefill case, don't return empty chunks
359
359
continue
360
360
361
- if request .logprobs is not None :
361
+ if request .logprobs is not None and output . token_ids :
362
362
assert out_logprobs is not None , (
363
363
"Did not output logprobs" )
364
364
logprobs = self ._create_completion_logprobs (
You can’t perform that action at this time.
0 commit comments