Skip to content
Merged
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
11 changes: 11 additions & 0 deletions aixplain/modules/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ def deploy(self) -> None:
try:
if hasattr(self, "tools"):
[tool.deploy() for tool in self.tools]
if hasattr(self, "agents"):
undeployed_agents = [agent for agent in self.agents if agent.status != AssetStatus.ONBOARDED]
if undeployed_agents:
names = ", ".join(str(agent) for agent in undeployed_agents)
if names:
raise ValueError(
f"Agents not deployed: {names}. "
"Deploy them with `<agent>.deploy()` before running this command."
)


self.status = AssetStatus.ONBOARDED
self.update()
except Exception as e:
Expand Down