Soulter / hugging-chat-api

HuggingChat Python API🤗
GNU Affero General Public License v3.0
859 stars 123 forks source link

Is it possible to continue a chat in the next session? #222

Closed tkarrergit closed 3 months ago

tkarrergit commented 6 months ago

Is it possible to continue a chat in the next session? It would be ideal if a conversation ID could be saved and used in the next session to resume the chat. How can I achieve this? Thank you very much for your assistance.

github-actions[bot] commented 6 months ago

Hi! Thanks for your issue, we will deal with your issue as soon as possible.

YWaller commented 5 months ago

Let me +1 this one. I also would like this functionality. I can't seem to, even though I'm saving the conversation id, get the bot to carry a conversation past one message. All my attempts using session stuff (flask) fail - get_conversation_from_id, etc.

Essentially, the issue is that I either need to be able to save out the chatbot instance (chatbot = hugchat.ChatBot(cookies=cookies.get_dict())) or I need to be able to retrieve a conversation with a new instance of chatbot.

EDIT: I fixed this myself - since I have a database connection anyway, I just send the chatbot instance pickled and base64 encoded (json compatability) to the db, then grab it back and restore it.

github-actions[bot] commented 3 months ago

This issue was marked as stale because of inactivity.

github-actions[bot] commented 3 months ago

This issue was closed because of inactivity.