Fix the GPT function calling regex to allow dash in the name (#10577)
This commit is contained in:
1 parent
1103dc6204
commit
ec1cd90ac9
2 files changed
+3
-3
No files matched your search
@@ -31,7 +31,7 @@ class GptOssDetector(BaseFormatDetector):
|
||||
|
||||
# Pattern to extract function name and JSON from tool_call event content
|
||||
self.tool_extract_pattern = re.compile(
|
||||
r"to=([a-zA-Z_][a-zA-Z0-9_.]*)\s*<\|constrain\|>json<\|message\|>(.*?)(?:<\|call\|>|$)",
|
||||
r"to=([a-zA-Z_][a-zA-Z0-9_.-]*)\s*<\|constrain\|>json<\|message\|>(.*?)(?:<\|call\|>|$)",
|
||||
re.DOTALL,
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user