Skip to content

Commit

Permalink
[Bugfix] Fixed final instance check and formatting
Browse files Browse the repository at this point in the history
Signed-off-by: cedonley <[email protected]>
  • Loading branch information
cedonley committed Nov 29, 2024
1 parent 77490ef commit f630a0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vllm/entrypoints/openai/serving_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,11 @@ async def chat_completion_stream_generator(
if self._should_check_for_unstreamed_tool_arg_tokens(
delta_message, output) and tool_parser:
latest_delta_len = 0
if (isinstance(delta_message,DeltaMessage)):
if ((isinstance(
delta_message.tool_calls[0].function,
DeltaFunctionCall)) and isinstance(
delta_message.tool_calls[0].function.
arguments, str)):
latest_delta_len = len(
delta_message.tool_calls[0].function.
arguments)
Expand Down

0 comments on commit f630a0c

Please sign in to comment.