We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17430e3 commit 1c2478dCopy full SHA for 1c2478d
vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py
@@ -340,8 +340,10 @@ def extract_tool_calls_streaming(
340
341
# last case -- we have an update to existing arguments.
342
elif cur_arguments and prev_arguments:
343
- if isinstance(delta_text, str) and len(delta_text.rstrip(
344
- )) >= 1 and delta_text.rstrip()[-1] == '}':
+ if isinstance(delta_text, str) \
+ and len(delta_text.rstrip()) >= 2 \
345
+ and delta_text.rstrip()[-1] == '}' \
346
+ and delta_text.rstrip()[-2] == '}':
347
delta_text = delta_text.rstrip()[:-1]
348
349
logger.debug("got diff %s", delta_text)
0 commit comments