Chat Threads, ConversationAgent (WIP)
This commit is contained in:
1 parent
22fe5619d8
commit
e8d80c5495
6 files changed
+519
-46
No files matched your search
@@ -180,9 +180,17 @@ def start_server(app):
|
||||
message = app.send_chat_message(
|
||||
chat_id=body['chatId'],
|
||||
content=body['content'],
|
||||
thread_id=body.get('threadId'),
|
||||
)
|
||||
await send({'message': "message sent", 'messageId': message['id'], 'nonce': nonce})
|
||||
|
||||
elif action == "create-chat-thread":
|
||||
thread_id = app.create_chat_thread(
|
||||
chat_id=body['chatId'],
|
||||
name=body.get('name'),
|
||||
)
|
||||
await send({'message': "chat thread created", 'threadId': thread_id, 'nonce': nonce})
|
||||
|
||||
elif action == "send-agent-prompt":
|
||||
response = await app.send_agent_prompt(body['agentId'], body['content'])
|
||||
await send({'message': "propmt sent", 'response': response, 'nonce': nonce})
|
||||
|
||||
Reference in new issue
Block a user