Skip to content
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

Clear method to clear messages #169

Open
jtpio opened this issue Feb 15, 2025 · 1 comment
Open

Clear method to clear messages #169

jtpio opened this issue Feb 15, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@jtpio
Copy link
Member

jtpio commented Feb 15, 2025

Problem

Currently consumers of IChatModel need to use the following method to clear all messages:

messagesDeleted(index: number, count: number): void;

For example:

this.messagesDeleted(0, this.messages.length);

Proposed Solution

Maybe it could be more convenient if a clear method was exposed?

Additional context

One objection would be that adding a new method increases the API surface.

@jtpio jtpio added the enhancement New feature or request label Feb 15, 2025
@jtpio jtpio changed the title Clear method to clear previous messages Clear method to clear messages Feb 15, 2025
@brichet
Copy link
Collaborator

brichet commented Feb 17, 2025

Thanks @jtpio, that would be useful 👍, indeed.

@dlqqq dlqqq moved this to Todo in Jupyter AI Feb 17, 2025
@dlqqq dlqqq added this to Jupyter AI Feb 17, 2025
@dlqqq dlqqq removed this from Jupyter AI Feb 17, 2025
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