From 0395765723ae16fda9f38ce225ae6f6a833d04f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Wed, 29 Jan 2025 05:22:12 +0530 Subject: [PATCH] remove think tags --- openhands/agenthub/codeact_agent/action_parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openhands/agenthub/codeact_agent/action_parser.py b/openhands/agenthub/codeact_agent/action_parser.py index cece5daa04fe..ec762f1e83d5 100644 --- a/openhands/agenthub/codeact_agent/action_parser.py +++ b/openhands/agenthub/codeact_agent/action_parser.py @@ -54,6 +54,8 @@ def parse_response(self, response) -> str: if action is None: return '' + action = re.sub(r".*?", "", action, flags=re.DOTALL) + action = action.replace(r'\_', '_') # Mistral Large gives \_ instead of _ three_backticks = '```' if action.count(three_backticks) % 2 == 1 and '