From e43646f67558a28d45c1f3face7d4643f452493f Mon Sep 17 00:00:00 2001 From: liujiangning30 <147385819+liujiangning30@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:22:49 +0800 Subject: [PATCH] fix bug of Internlm2Protocol.parse (#180) --- lagent/agents/internlm2_agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lagent/agents/internlm2_agent.py b/lagent/agents/internlm2_agent.py index 6e159420..6ebfb539 100644 --- a/lagent/agents/internlm2_agent.py +++ b/lagent/agents/internlm2_agent.py @@ -175,7 +175,8 @@ def parse(self, message, plugin_executor: ActionExecutor, code = code.split(self.tool['end'].strip())[0].strip() return 'interpreter', message, dict( name=interpreter_executor.action_names()[0], - parameters=dict(command=code)) + parameters=dict( + command=code)) if interpreter_executor else None return None, message.split(self.tool['start_token'])[0], None def format_response(self, action_return, name) -> dict: