[GH-ISSUE #342] Cleaning the context #77828

Closed
opened 2026-05-08 19:43:16 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @toto83fr on GitHub (Aug 14, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/342

Hi,

AFAIK it is impossible to clean the context when a model is running. Is there plans to implement this function?

Originally created by @toto83fr on GitHub (Aug 14, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/342 Hi, AFAIK it is impossible to clean the context when a model is running. Is there plans to implement this function?
GiteaMirror added the feature request label 2026-05-08 19:43:17 -05:00
Author
Owner

@mchiang0610 commented on GitHub (Aug 14, 2023):

@toto83fr Thanks for submitting this. Do you mind elaborating a little bit more on what you are looking to do? Looking at the comment, I assume you're doing this on the CLI instead of using the Ollama API?

<!-- gh-comment-id:1677599242 --> @mchiang0610 commented on GitHub (Aug 14, 2023): @toto83fr Thanks for submitting this. Do you mind elaborating a little bit more on what you are looking to do? Looking at the comment, I assume you're doing this on the CLI instead of using the Ollama API?
Author
Owner

@toto83fr commented on GitHub (Aug 15, 2023):

Yes, to start a new conversation without closing the terminal and re-running the model.

<!-- gh-comment-id:1678732720 --> @toto83fr commented on GitHub (Aug 15, 2023): Yes, to start a new conversation without closing the terminal and re-running the model.
Author
Owner

@technovangelist commented on GitHub (Aug 23, 2023):

Thanks for submitting. We will keep looking into this to see if we can achieve what you are looking for.

<!-- gh-comment-id:1690784311 --> @technovangelist commented on GitHub (Aug 23, 2023): Thanks for submitting. We will keep looking into this to see if we can achieve what you are looking for.
Author
Owner

@mchiang0610 commented on GitHub (Aug 30, 2023):

@toto83fr

Sorry for the delay in getting back to you. You shouldn't need to close the terminal, but if you do want a new session on the CLI, you do need to do ollama run again.

If you use the API, you will be able to just 'clean' the context.

Please let me know if this helps. Closing this for now.

<!-- gh-comment-id:1699860258 --> @mchiang0610 commented on GitHub (Aug 30, 2023): @toto83fr Sorry for the delay in getting back to you. You shouldn't need to close the terminal, but if you do want a new session on the CLI, you do need to do ollama run again. If you use the API, you will be able to just 'clean' the context. Please let me know if this helps. Closing this for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77828