Chat Threads, ConversationAgent (WIP)

This commit is contained in:
Shivering Ocelot committed 2025-06-16 19:59:37 -05:00
1 parent 22fe5619d8
commit e8d80c5495
6 files changed
+519 -46

No files matched your search

+8
View File
@@ -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})