Skip to content

Commit d9dedaf

Browse files
committed
Fix type action parse bug
1 parent 87a2230 commit d9dedaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

codes/ui_tars/action_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def parse_action_to_structure_output(text,
197197
all_action = []
198198
for action_str in tmp_all_action:
199199
if "type(content" in action_str:
200+
if not action_str.strip().endswith(")"):
201+
action_str = action_str.strip() + ")"
200202
# 正则表达式匹配 content 中的字符串并转义单引号
201203
def escape_quotes(match):
202204
content = match.group(1) # 获取 content 的值

0 commit comments

Comments
 (0)