enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
5.51k stars 1.26k forks source link

Enhanced Chat History Management #137

Closed syberkitten closed 1 year ago

syberkitten commented 1 year ago

This is a feature request not an issue.

It would be great to be able to save all the chats history and reload it, this way will allow much more flexibility to use the system for research and work, with having different "Contexts" of chats.

Further I would say that each chats history should first not be limited to 20 items (no limit is better) And also the ability to group chats history.

For example when I'm working on code, I might open 5-10 chats which are related to one topic of work, then I start another project, and can open another 20 chats.

Currently I'm very limited in this scope, so the export import is just a workaround / first steps, the main idea is that you can manage different Dialogue groups and of course export / import them as well.

Last but not least, search within all these History Chat history Dialogue History, I don't understand why nobody did this yet, it's a must - go try find a sentence in 20 chats manually....

syberkitten commented 1 year ago

This is how ChatGPT4 Summarizes this request:

Enhanced Chat History Management

  1. Chat History Saving and Reloading: The ability to save and reload chat histories would significantly improve the system's flexibility, particularly for research and work purposes. This feature would allow users to maintain different "contexts" of chats.

  2. Unlimited Chat History: Currently, chat history is limited to 20 items. Removing this limit would provide a more comprehensive view of past interactions.

  3. Chat History Grouping: The ability to group related chats would be beneficial. For instance, when working on a project, a user might open multiple chats related to a single topic. Grouping these chats would help keep related discussions organized and easily accessible.

  4. Chat History Management: The ability to manage different dialogue groups, including exporting and importing them, would provide greater control over chat interactions.

  5. Chat History Search: A search function within the chat history would greatly improve usability. This feature is essential for quickly locating specific information within numerous chat interactions.

These enhancements aim to provide a more user-friendly and efficient chat experience, particularly for those using the system for complex projects or research.

tmikaeld commented 1 year ago

I'm in the same boat, I use it mainly for coding.

It would be great if:

enricoros commented 1 year ago

I'm in the same boat, I use it mainly for coding.

Same - and for life advice, workout plan, to go IRL to restaurants and pick wines, and now also to chat with public personas ;)

We could have as many chats as we need.

Considering raising to 50, but LocalStorage in the browser is strongly limited (we're at 50% capacity right now, and to really scale we'll need server-side storage). Will need a different storage option. Are you ok to have remote storage in a server?

Could have multiple tabs with chats (That can be named).

Can you give me more details on this?! I like it (also need to consider the mobile UI experience)

The ability to purge a whole tab (With confirmation)

Something different that the current "Reset" in the Chat menu?

tmikaeld commented 1 year ago

@enricoros

When it comes to local-storage, I'd suggest using IndexedDB instead, it's not limited and I still suggest that we store a backup on the server-side that's encrypted based on a password. That way, all settings and chats can be stored, restored and backed up at the same time while keeping maximum privacy/security. Web Crypto API is perfect for this and supported in all modern browsers.

On desktop you show them as tabs and on mobile, you show the tabs as a menu that folds to the right, makes for excellent use of space and keeping it powerful on mobile.

Yep, reset, clear, purge, whatever naming you want.

enricoros commented 1 year ago

On desktop you show them as tabs and on mobile, you show the tabs as a menu that folds to the right, makes for excellent use of space and keeping it powerful on mobile.

Do you have a screenshot or any idea for that? It's unclear how tabs will relate to each other (data and UX perspective)

tmikaeld commented 1 year ago

Top menu is the tabs, then in the drilldown it's the chats. So like this:

image

enricoros commented 1 year ago

This is an interesting concept. What would be the top level tabs for you, are they Projects, Topics, ...? Do you need an Incognito mode?

I'm very interesting in the relationship of chats inside tabs, and this is why. As far as UX feature, tabs can be liked or not, so I'm mild about giving it high priority compared to other features. bUT, if Tabs are Projects, or have common elements, such as Data is shared between them, or one is aware of the other, etc.. - then it becomes Useful, novel, cool. This is why I'm digging into your use case more :)

As far as backup, have you tried the new Export > Backup? It's new, and I could encrypt it with a password too, so one can then store it where they like (drive, Dropbox, anywhere..)

tmikaeld commented 1 year ago

If the top-level tabs can be named to anything. then they can be anything.

The problem with manual backups is that I won't spend time fiddling with it unless it's automatic.

Ashesh3 commented 1 year ago

@enricoros IndexedDB is the way to go for storing chat history! Made a PR for that: https://github.com/enricoros/big-agi/pull/158