[PR #12723] [CLOSED] Add ollama embed CLI command for interactive embeddings #19197

Closed
opened 2026-04-16 07:00:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12723
Author: @A-Akhil
Created: 10/21/2025
Status: Closed

Base: mainHead: embed


📝 Commits (3)

  • b1cdbe0 cmd: add EmbedHandler for generating embeddings with support for various formats and options
  • e9fe38e cmd: enhance embed command with detailed description and example usage
  • ecbed7f remove TODO comment for embedding support in Execute function

📊 Changes

4 files changed (+348 additions, -1 deletions)

View changed files

📝 README.md (+8 -0)
📝 cmd/cmd.go (+169 -0)
📝 cmd/cmd_test.go (+171 -0)
📝 runner/ollamarunner/runner.go (+0 -1)

📄 Description

Add ollama embed Cobra command that streams stdin through embedding models using the existing API client.

  • Support interactive readline sessions, plain-text output, and JSON formatting.
  • Include keepalive, truncate, and dimensions flags.
  • Document usage in README.

Closes #12709


🔄 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/12723 **Author:** [@A-Akhil](https://github.com/A-Akhil) **Created:** 10/21/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `embed` --- ### 📝 Commits (3) - [`b1cdbe0`](https://github.com/ollama/ollama/commit/b1cdbe07b5b421489c2e1fb82145abd748922c3f) cmd: add EmbedHandler for generating embeddings with support for various formats and options - [`e9fe38e`](https://github.com/ollama/ollama/commit/e9fe38e883658a3d9e59878fa6e1f5d974200f69) cmd: enhance embed command with detailed description and example usage - [`ecbed7f`](https://github.com/ollama/ollama/commit/ecbed7ff5e6e7391ed40614019d87cc5290080f4) remove TODO comment for embedding support in Execute function ### 📊 Changes **4 files changed** (+348 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+8 -0) 📝 `cmd/cmd.go` (+169 -0) 📝 `cmd/cmd_test.go` (+171 -0) 📝 `runner/ollamarunner/runner.go` (+0 -1) </details> ### 📄 Description Add `ollama embed` Cobra command that streams stdin through embedding models using the existing API client. - Support interactive readline sessions, plain-text output, and JSON formatting. - Include `keepalive`, `truncate`, and `dimensions` flags. - Document usage in README. Closes #12709 --- <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-16 07:00:33 -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#19197