use agentname in ws actions and frontend
This commit is contained in:
1 parent
3b2b3507e5
commit
56e4844992
6 files changed
+61
-25
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user