mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08: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:
@@ -35,7 +35,8 @@ class DeepSeekV31ToolCallParser(ToolCallParser):
|
|||||||
|
|
||||||
# Regex captures: function_name, function_arguments
|
# Regex captures: function_name, function_arguments
|
||||||
PATTERN = re.compile(
|
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:
|
def parse(self, text: str) -> ParseResult:
|
||||||
|
|||||||
Reference in New Issue
Block a user