continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
15.81k stars 1.2k forks source link

Users should be able to modify conversation history that is sent to the API. #1715

Open Olyray opened 2 months ago

Olyray commented 2 months ago

Validations

Problem

The problem is that of cost. Apparently, the AI is stateless, meaning that each query that is sent to the AI is sent along with the pre-existing context in the chat.

What this means is that the more a user interacts with the AI, the more tokens are consumed by the API as the context has to be sent each time.

Solution

Since the AI is stateless, the solution would be to allow users modify the context. Users should be able to delete messages from the context history. That way, only relevant context would be sent to the API. The alternative of starting a new chat every time is bad user experience to be honest. This is because there might be some context that you want to include in the chat, but starting afresh means you'll lose the context.

If users can delete irrelevant messages from the context, then they can delete the irrelevant messages and leave the relevant ones. Making it possible for them to better manage the number of tokens consumed by the API.

joshvera commented 1 month ago

Opened a PR to address this with a Delete Message button at https://github.com/continuedev/continue/pull/1790

Olyray commented 1 month ago

Opened a PR to address this with a Delete Message button at #1790

Oh. Wow. Nice!