nlkitai / nlux

The π—£π—Όπ˜„π—²π—Ώπ—³π˜‚π—Ή Conversational AI JavaScript Library πŸ’¬ β€”Β UI for any LLM, supporting LangChain / HuggingFace / Vercel AI, and more 🧑 React, Next.js, and plain JavaScript ⭐️
https://docs.nlkit.com/nlux
Other
943 stars 48 forks source link

Load chat history #23

Closed jungleau closed 5 months ago

jungleau commented 5 months ago

I'm not sure if this chatbot currently supports loading chat history? Say for example, the user had some chat with the chatbot and then closed the chat window. After a few minutes, the user reopens the chat window; he wants to see the chat history and continue with the previous chat, rather than starting a new one. In this case, I can load the chat history from my getChatHistory API, which returns below "ChatHistory" object:

[
    {
        "role": "user",
        "content": "what file formats I can upload?"
    },
    {
        "role": "assistant",
        "content": "You can upload the following file formats: PDF, MP4, MOV, GIF, JPG, PNG, and PSD."
    }
]

Is it possible to load this ChatHistory in the chat window?

Cattpot commented 5 months ago

I also need to load old Chat History, cant find any hints in the documentary..

salmenus commented 5 months ago

@jungleau @Cattpot There is a feature for chat history hydration that is planned for later ref project dashboard Conversation History Hydration

Since both of you are requesting this, I'll try to prioritise it for next week's release (if I get time). I'll keep you posted via this discussion.

salmenus commented 5 months ago

Good news @jungleau @Cattpot : Conversation history feature is now ready πŸŽ‰

Make sure you update to version 0.10.5 or later to have it.