Skip to content

In Interactive mode, add a command to clear current context #4298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
alexconstant9108 opened this issue Dec 2, 2023 · 3 comments
Closed
4 tasks done
Labels
enhancement New feature or request

Comments

@alexconstant9108
Copy link

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Feature Description

What the title is saying: add a command, for example Ctrl+R to clear the current context so that the next User input will an empty context instead of the current one.

Motivation

This will be more convenient when chatting and exceeding the current context limit or just wanting to start a new conversation from a clean state.

Possible Implementation

Add a Ctrl+R (to reset / clear) the current context.

@alexconstant9108 alexconstant9108 added the enhancement New feature or request label Dec 2, 2023
@alexconstant9108
Copy link
Author

@KerfuffleV2 now I am reading your comment here #2593 (comment)
Would it be possible to add such a command to your simple-inference for interactive mode? :)

@KerfuffleV2
Copy link
Collaborator

Yes it wouldn't be too hard, but someone else would have to add the feature. Basically just add a command that clears the KV cache for a sequence and resets the history vector of tokens for that sequence in the state.

@alexconstant9108
Copy link
Author

I can try doing that but there are merge conflicts between your branch and the current master branch. Can you fix them first?

@alexconstant9108 alexconstant9108 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants