Skip to content

Commit 5417379

Browse files
Update vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py
gemini proposal Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent cc98529 commit 5417379

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, tokenizer: AnyTokenizer):
4444
self.tool_call_end_token: str = "</tool_call>"
4545

4646
self.tool_call_regex = re.compile(
47-
r"(?:<tool_call>)+(.*?)</tool_call>|<tool_call>(.*)", re.DOTALL)
47+
r"(?:<tool_call>\s*)+(.*?)</tool_call>|<tool_call>(.*)", re.DOTALL)
4848
self.scratch_pad_regex = re.compile(
4949
r"<scratch_pad>(.*?)</scratch_pad>", re.DOTALL)
5050

0 commit comments

Comments
 (0)