Skip to content

Commit

Permalink
fix bug of Internlm2Protocol.parse (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiangning30 authored Apr 11, 2024
1 parent 581d9fb commit e43646f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lagent/agents/internlm2_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e43646f

Please sign in to comment.