[PR #641] [MERGED] allow the user to cancel generating with ctrl-C #41523

Closed
opened 2026-04-24 21:23:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/641
Author: @pdevine
Created: 9/28/2023
Status: Merged
Merged: 9/29/2023
Merged by: @pdevine

Base: mainHead: cancel-context


📝 Commits (1)

  • 4ede437 allow the user to cancel generating with ctrl-C

📊 Changes

1 file changed (+24 additions, -3 deletions)

View changed files

📝 cmd/cmd.go (+24 -3)

📄 Description

The change allows the user to cancel generating using Ctrl-C in the REPL. It handles both the cases where the request is canceled before the stream starts back, as well as when the request is streaming.

It also changes the REPL so that you can't accidentally hit Ctrl-C and exit the REPL. Instead it will prompt the user to use Ctrl-D or /bye instead.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/641 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 9/28/2023 **Status:** ✅ Merged **Merged:** 9/29/2023 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `cancel-context` --- ### 📝 Commits (1) - [`4ede437`](https://github.com/ollama/ollama/commit/4ede437bdac6abb66e0815cc925b8eb9024080d9) allow the user to cancel generating with ctrl-C ### 📊 Changes **1 file changed** (+24 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+24 -3) </details> ### 📄 Description The change allows the user to cancel generating using Ctrl-C in the REPL. It handles both the cases where the request is canceled before the stream starts back, as well as when the request is streaming. It also changes the REPL so that you can't accidentally hit Ctrl-C and exit the REPL. Instead it will prompt the user to use Ctrl-D or `/bye` instead. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-24 21:23:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#41523