Skip to content

Commit

Permalink
Improve agent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
bonk1t committed Jan 27, 2024
1 parent bd70a0c commit 45a0314
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nalgonda/routers/v1/api/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ async def create_or_update_agent(
agent_config.owner_id = current_user.id

# FIXME: a workaround explained at the top of the file
if not agent_config.name.startswith(f"{agent_config.owner_id}-"):
agent_config.name = f"{agent_config.owner_id}-{agent_config.name}"
if not agent_config.name.endswith(f" ({agent_config.owner_id})"):
agent_config.name = f"{agent_config.name} ({agent_config.owner_id})"

agent_id = await agent_manager.create_or_update_agent(agent_config)
return {"agent_id": agent_id}

0 comments on commit 45a0314

Please sign in to comment.