[PR #12795] [MERGED] embeddings: added embedding command for cl #24493

Closed
opened 2026-04-19 17:36:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12795
Author: @npardal
Created: 10/28/2025
Status: Merged
Merged: 11/5/2025
Merged by: @npardal

Base: mainHead: pr-12723


📝 Commits (10+)

  • 683772e cmd: add EmbedHandler for generating embeddings with support for various formats and options
  • 6661ed5 cmd: enhance embed command with detailed description and example usage
  • 60d29db remove TODO comment for embedding support in Execute function
  • 240ca85 removed interactive mode
  • a204373 fixed failing test
  • ac167e3 removed stdout/stin and updated tests
  • 91165e6 replied to cl errors
  • 958438b docs made
  • 0c8156b removed json flag
  • 70cf74b updated tests and removed loop

📊 Changes

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

View changed files

📝 README.md (+12 -0)
📝 cmd/cmd.go (+68 -1)
📝 cmd/cmd_test.go (+324 -0)
📝 docs/cli.mdx (+12 -0)

📄 Description

This PR introduces a new ollama embed command that allows users to generate embeddings directly from the command line.

Added ollama embed MODEL [TEXT...] command for generating text embeddings
Supports both direct text arguments and stdin piping for scripted workflows

Outputs embeddings as JSON arrays (one per line)


🔄 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/12795 **Author:** [@npardal](https://github.com/npardal) **Created:** 10/28/2025 **Status:** ✅ Merged **Merged:** 11/5/2025 **Merged by:** [@npardal](https://github.com/npardal) **Base:** `main` ← **Head:** `pr-12723` --- ### 📝 Commits (10+) - [`683772e`](https://github.com/ollama/ollama/commit/683772e886a560ae8b97278d51b4c7e3a49564d5) cmd: add EmbedHandler for generating embeddings with support for various formats and options - [`6661ed5`](https://github.com/ollama/ollama/commit/6661ed5def0ca5e616cb252518cd9fbc42e8b4ac) cmd: enhance embed command with detailed description and example usage - [`60d29db`](https://github.com/ollama/ollama/commit/60d29dbdf0f0dc7a2d9a0009ddfe949922bbbc95) remove TODO comment for embedding support in Execute function - [`240ca85`](https://github.com/ollama/ollama/commit/240ca853fc8bc73df627f185b79b4a98bf88748c) removed interactive mode - [`a204373`](https://github.com/ollama/ollama/commit/a204373ec939538ae7fb8be9f463e4ecfa00db11) fixed failing test - [`ac167e3`](https://github.com/ollama/ollama/commit/ac167e3a2a6032349dcccec121c2bdc92eac5326) removed stdout/stin and updated tests - [`91165e6`](https://github.com/ollama/ollama/commit/91165e6b6fc00931c4fc2739a15b8e817eb9d50e) replied to cl errors - [`958438b`](https://github.com/ollama/ollama/commit/958438b55b7eb5edc43cbde7edc0aa1df8b137ef) docs made - [`0c8156b`](https://github.com/ollama/ollama/commit/0c8156b5048ae6324e8fd2c334606ee5efca957d) removed json flag - [`70cf74b`](https://github.com/ollama/ollama/commit/70cf74b0e8a2192ec71ff3995b8827ece83c8728) updated tests and removed loop ### 📊 Changes **4 files changed** (+416 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+12 -0) 📝 `cmd/cmd.go` (+68 -1) 📝 `cmd/cmd_test.go` (+324 -0) 📝 `docs/cli.mdx` (+12 -0) </details> ### 📄 Description This PR introduces a new ollama embed command that allows users to generate embeddings directly from the command line. Added ollama embed MODEL [TEXT...] command for generating text embeddings Supports both direct text arguments and stdin piping for scripted workflows Outputs embeddings as JSON arrays (one per line) --- <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-19 17:36:30 -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#24493