Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion aixplain/factories/agent_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ def list(cls) -> Dict:
total = len(results)
logging.info(f"Response for GET List Agents - Page Total: {page_total} / Total: {total}")
for agent in results:
agents.append(build_agent(agent))
try:
agents.append(build_agent(agent))
except Exception:
logging.warning(f"There was an error building the agent {agent['name']}. Skipping...")
continue
return {
"results": agents,
"page_total": page_total,
Expand Down
7 changes: 6 additions & 1 deletion aixplain/factories/team_agent_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,12 @@ def list(cls) -> Dict:
total = len(results)
logging.info(f"Response for GET List Agents - Page Total: {page_total} / Total: {total}")
for agent in results:
agents.append(build_team_agent(agent))
try:
team_agent_ = build_team_agent(agent)
agents.append(team_agent_)
except Exception:
logging.warning(f"There was an error building the team agent {agent['name']}. Skipping...")
continue
return {"results": agents, "page_total": page_total, "page_number": 0, "total": total}
else:
error_msg = "Agent Listing Error: Please contact the administrators."
Expand Down