Skip to content

Commit

Permalink
Update call_log_helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluder-Paradyne authored Oct 10, 2023
1 parent b4b9e42 commit cb19f16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superagi/apm/call_log_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def fetch_data(self, model: str):
agents = self.session.query(Agent).filter(Agent.id.in_(run_agent_ids)).all()
agent_id_name_map = {agent.id: agent.name for agent in agents}
tools_used = [run.tool_used for run in runs]
toolkit_ids_allowed = self.session.query(Toolkit.id).filter(Toolkit.org_id == self.organisation_id).all()
toolkit_ids_allowed = self.session.query(Toolkit.id).filter(Toolkit.organisation_id == self.organisation_id).all()
tools = self.session.query(Tool).filter(Tool.id.in_(tools_used), Tool.toolkit_id.in_(toolkit_ids_allowed))\
.all()
tools_name_toolkit_id_map = {tool.name: tool.toolkit_id for tool in tools}
Expand All @@ -82,4 +82,4 @@ def fetch_data(self, model: str):

except SQLAlchemyError as err:
logging.error(f"Error while fetching call log data: {str(err)}")
return None
return None

0 comments on commit cb19f16

Please sign in to comment.