[PR #1936] [MERGED] Convert the REPL to use /api/chat for interactive responses #10731

Closed
opened 2026-04-12 23:09:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1936
Author: @pdevine
Created: 1/11/2024
Status: Merged
Merged: 1/12/2024
Merged by: @pdevine

Base: mainHead: replchat


📝 Commits (3)

  • 7efd582 change interactive mode to use /api/chat instead of generate
  • a3507b9 dry out the display response
  • f20bf95 address the linter

📊 Changes

2 files changed (+155 additions, -72 deletions)

View changed files

📝 cmd/cmd.go (+124 -54)
📝 cmd/interactive.go (+31 -18)

📄 Description

This change switches the REPL to use /api/chat when running in interactive mode. It will still use /api/generate for non-interactive sessions. I've also attempted to DRY out the display response for calls to either end point to be able to properly do word wrapping.


🔄 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/1936 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 1/11/2024 **Status:** ✅ Merged **Merged:** 1/12/2024 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `replchat` --- ### 📝 Commits (3) - [`7efd582`](https://github.com/ollama/ollama/commit/7efd582a83fc69e3100b31589a3f32895fc66882) change interactive mode to use /api/chat instead of generate - [`a3507b9`](https://github.com/ollama/ollama/commit/a3507b90cc5e8d306c4c27ec405109aa48352fa8) dry out the display response - [`f20bf95`](https://github.com/ollama/ollama/commit/f20bf95b330f4e1e1d1b84fbcb32d2c6f0cbcefa) address the linter ### 📊 Changes **2 files changed** (+155 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+124 -54) 📝 `cmd/interactive.go` (+31 -18) </details> ### 📄 Description This change switches the REPL to use `/api/chat` when running in interactive mode. It will still use `/api/generate` for non-interactive sessions. I've also attempted to DRY out the display response for calls to either end point to be able to properly do word wrapping. --- <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-12 23:09:07 -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#10731