[PR #2326] [CLOSED] Reject empty prompts on embeddings api #36730

Closed
opened 2026-04-22 21:22:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2326
Author: @alpe
Created: 2/2/2024
Status: Closed

Base: mainHead: 2140_reject_empty_prompt


📝 Commits (1)

  • 0914064 Reject empty prompts on embeddings api

📊 Changes

3 files changed (+50 additions, -21 deletions)

View changed files

📝 llm/dyn_ext_server.go (+6 -0)
📝 server/routes.go (+4 -0)
📝 server/routes_test.go (+40 -21)

📄 Description

Resolves #2140

This PR prevents empty prompts for the api/embeddings endpoint. Please note that other endpoints may be affected as well. 🤷

The changes to the unit test contain some minor updates as well to make better use of the testing framework of stdgo.


🔄 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/2326 **Author:** [@alpe](https://github.com/alpe) **Created:** 2/2/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `2140_reject_empty_prompt` --- ### 📝 Commits (1) - [`0914064`](https://github.com/ollama/ollama/commit/0914064536360a0c9eb278776a723d7894395f6f) Reject empty prompts on embeddings api ### 📊 Changes **3 files changed** (+50 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `llm/dyn_ext_server.go` (+6 -0) 📝 `server/routes.go` (+4 -0) 📝 `server/routes_test.go` (+40 -21) </details> ### 📄 Description Resolves #2140 This PR prevents empty prompts for the `api/embeddings` endpoint. Please note that other endpoints may be affected as well. 🤷 The changes to the unit test contain some minor updates as well to make better use of the testing framework of stdgo. --- <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-22 21:22:44 -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#36730