Hacker News new | past | comments | ask | show | jobs | submit login

Did you somehow get it to play nice with multi-party chats, or does every user have their own private 1-1 room with the bot?



Both work. I have an SQLite db where i save "rooms", "sessions" and "messages". So multiple users can contribute in the same chat session, where i pass the whole conversation history to the AI as context. Then there are commands to switch and delete sessions. When the bot is mentioned in a message, it gets the answer from the API in a different thread and shows a writing indicator. It also plays super nice with the Element Matrix client which supports tables and codeblocks. The openai API sends back markdown which i can parse into html and send like that. I want to clean up my code a bit and then open source the bot.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: