Skip to content

Commit

Permalink
update pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
yalu4 committed Apr 25, 2024
1 parent 803a125 commit 1c88c1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/promptflow-tools/promptflow/tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def try_parse_tool_call_id_and_content(role_prompt):
def try_parse_tool_calls(role_prompt):
# customer can add ## in front of tool_calls for markdown highlight.
# and we still support tool_calls without ## prefix for backward compatibility.
pattern = r"\n*#{0,2}\s*tool_calls:\n*\s*(\[.*?\])"
pattern = r"\n*#{0,2}\s*tool_calls\s*:\s*\n+\s*(\[.*?\])"
match = re.search(pattern, role_prompt, re.DOTALL)
if match:
try:
Expand Down

0 comments on commit 1c88c1d

Please sign in to comment.