[PR #12242] [MERGED] feat: add dimensions field to embed requests #12483

Closed
opened 2025-11-12 16:36:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12242
Author: @mxyng
Created: 9/10/2025
Status: Merged
Merged: 9/11/2025
Merged by: @mxyng

Base: mainHead: mxyng/truncate-dim


📝 Commits (2)

  • 505281e feat: add field to truncate embeddings
  • a1b74d5 add openai embeddings for dimensions

📊 Changes

4 files changed (+16 additions, -9 deletions)

View changed files

📝 api/types.go (+4 -0)
📝 docs/api.md (+1 -0)
📝 openai/openai.go (+4 -3)
📝 server/routes.go (+7 -6)

📄 Description

similar to sentence-transformers's truncate_dim, the dimensions option will truncate the output embedding


🔄 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/12242 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 9/10/2025 **Status:** ✅ Merged **Merged:** 9/11/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/truncate-dim` --- ### 📝 Commits (2) - [`505281e`](https://github.com/ollama/ollama/commit/505281e40f2ddfe91b850a427f7cf277f76e639f) feat: add field to truncate embeddings - [`a1b74d5`](https://github.com/ollama/ollama/commit/a1b74d513b8c975c3e0d931d4f0115955bbb1395) add openai embeddings for dimensions ### 📊 Changes **4 files changed** (+16 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+4 -0) 📝 `docs/api.md` (+1 -0) 📝 `openai/openai.go` (+4 -3) 📝 `server/routes.go` (+7 -6) </details> ### 📄 Description similar to `sentence-transformers`'s `truncate_dim`, the `dimensions` option will truncate the output embedding --- <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 2025-11-12 16:36:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#12483
No description provided.