use agentname in ws actions and frontend

This commit is contained in:
Shivering Ocelot committed 2026-08-30 23:42:23 -05:00
1 parent 3b2b3507e5
commit 56e4844992
6 files changed
+61 -25

No files matched your search

+6
View File
@@ -103,6 +103,12 @@ class App(ChatMixin):
raise Exception(f"Agent not found with id {agent_id}")
return agent
async def agent_id_from_name(self, agentname: str):
agent_id = await db.Agent.get_or_none(agentname=agentname).values_list("id", flat=True)
if not agent_id:
raise Exception(f"Agent not found with agentname {agentname}")
return agent_id
async def create_agent(self, user_id, name, agentname, description, picture, kind, data, main_chat_id=None, temporary=False):
print("create_agent; user_id, name:", user_id, name)