XpressAI / technologic

Technologic is a user-friendly AI Chatbot Client packed with features to enhance your chatting experience. Securely store conversations, modify messages, and easily organize them - all while enjoying compatibility with various backends, including OpenAI's API.
https://technologic.xpress.ai/
MIT License
19 stars 5 forks source link

Dialog export function #21

Open chenkelmann opened 4 months ago

chenkelmann commented 4 months ago

It would be useful if there where an option to export a dialog as it is currently shown (i.e. the currently selected alternatives etc.) as plain text or markdown. We often use LLMs to brainstorm ideas and the actual brainstorming is sometimes useful as additional information for tickets etc.

This would be a leightweight version of the requested sharing (https://github.com/XpressAI/technologic/issues/8) - a simple local download into a file or to the clipboard would be enough.

treo commented 4 months ago

This is likely a pretty easy to do, if you want to give it a try here are a few pointers:

https://github.com/XpressAI/technologic/blob/2ab07919ad114a9a88d15be0dede32425f8cf508/src/routes/settings/backup/%2Bpage.svelte#L7-L18

This shows how we currently do the full db dump, you can use it as an example for how to do the file download. It boils down to creating a blob with the requested data and giving it a file name before triggering the download.

The actual message thread that is currently shown is available here: https://github.com/XpressAI/technologic/blob/2ab07919ad114a9a88d15be0dede32425f8cf508/src/routes/%5BconversationId%5D/%2Bpage.svelte#L54

And this shows how to use it to get access to the individual messages of that thread: https://github.com/XpressAI/technologic/blob/2ab07919ad114a9a88d15be0dede32425f8cf508/src/routes/%5BconversationId%5D/%2Bpage.svelte#L299-L300

All that's you'd really need to do is to add a new function in that file that puts the message content into a string.

If you'd rather have me do it, I can spend the additional 5 minutes that are necessary to get that done.

chenkelmann commented 4 months ago

Added this ticket as a reminder for "when I have the time" (tm) - thanks for the pointers, will try it myself hopefully soon!