Skip to content

Commit

Permalink
Reverting Call log change due to error in fix iteration (TransformerO…
Browse files Browse the repository at this point in the history
…ptimus#1223)

Handled exception for error in fixed iteration
  • Loading branch information
luciferlinx101 authored Sep 12, 2023
1 parent f8dc068 commit 80cf30a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superagi/agent/agent_iteration_step_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def execute_step(self):
content = json.loads(response['content'])
tool = content.get('tool', {})
tool_name = tool.get('name', '') if tool else ''
except json.JSONDecodeError:
print("Decoding JSON has failed")
except Exception as e:
logger.error(f"Decoding JSON has failed {e}")
tool_name = ''

CallLogHelper(session=self.session, organisation_id=organisation.id).create_call_log(execution.name,agent_config['agent_id'],total_tokens, tool_name,agent_config['model'])
Expand Down

0 comments on commit 80cf30a

Please sign in to comment.