mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: add missing re.DOTALL to DeepSeek V3.1 parser (same bug as V3)
The V3.1 parser had the same issue — .*? without re.DOTALL fails to match multi-line JSON arguments. Found during review of PR #444.
This commit is contained in:
parent
936fda3f9e
commit
dc55f493be
1 changed files with 2 additions and 1 deletions
|
|
@ -35,7 +35,8 @@ class DeepSeekV31ToolCallParser(ToolCallParser):
|
|||
|
||||
# Regex captures: function_name, function_arguments
|
||||
PATTERN = re.compile(
|
||||
r"<|tool▁call▁begin|>(?P<function_name>.*?)<|tool▁sep|>(?P<function_arguments>.*?)<|tool▁call▁end|>"
|
||||
r"<|tool▁call▁begin|>(?P<function_name>.*?)<|tool▁sep|>(?P<function_arguments>.*?)<|tool▁call▁end|>",
|
||||
re.DOTALL,
|
||||
)
|
||||
|
||||
def parse(self, text: str) -> ParseResult:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue