[GH-ISSUE #5239] Add support for the new Ollama /api/embed api endpoint #13907

Closed
opened 2026-04-19 20:27:17 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @geekbozu on GitHub (Sep 7, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5239

Is your feature request related to a problem? Please describe.
Ollama added a newer endpoint for embeddings /api/embed.
OpenWebUI does not expose this on its API proxy.

Describe the solution you'd like
OpenWebUI proxies this endpoint as it does with other Ollama Endpoints.

Describe alternatives you've considered
We can always talk to ollama directly but doing that defeats the purpose of having OpenWebUI be in the middle!

Additional context
Add any other context or screenshots about the feature request here.
New endpoint documentation from Ollama
https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings

Deprecated endpoint
https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings

Originally created by @geekbozu on GitHub (Sep 7, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5239 **Is your feature request related to a problem? Please describe.** Ollama added a newer endpoint for embeddings /api/embed. OpenWebUI does not expose this on its API proxy. **Describe the solution you'd like** OpenWebUI proxies this endpoint as it does with other Ollama Endpoints. **Describe alternatives you've considered** We can always talk to ollama directly but doing that defeats the purpose of having OpenWebUI be in the middle! **Additional context** Add any other context or screenshots about the feature request here. New endpoint documentation from Ollama https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings Deprecated endpoint https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings
Author
Owner

@tjbck commented on GitHub (Sep 7, 2024):

Added to latest main!

<!-- gh-comment-id:2335032805 --> @tjbck commented on GitHub (Sep 7, 2024): Added to latest main!
Author
Owner

@geekbozu commented on GitHub (Sep 7, 2024):

Thanks for getting to this so fast!
Sadly there is a signature difference between /api/embed and /api/embeddings.
The body field that the data to generate embedding for has changed.

/api/embed/ expects body or input.
/api/embeddings expects prompt.

The way this was implemented will cause a regression on anyone expecting the older behavior (with prompt body) to still work!

<!-- gh-comment-id:2335981169 --> @geekbozu commented on GitHub (Sep 7, 2024): Thanks for getting to this so fast! Sadly there is a signature difference between /api/embed and /api/embeddings. The body field that the data to generate embedding for has changed. `/api/embed/` expects `body` or `input`. `/api/embeddings` expects `prompt`. The way this was implemented will cause a regression on anyone expecting the older behavior (with `prompt` body) to still work!
Author
Owner

@vills commented on GitHub (Sep 10, 2024):

@tjbck as i can see there is already a pull request to support Ollama's batch processing endpoint. Could you look at it please? https://github.com/open-webui/open-webui/pull/4715

<!-- gh-comment-id:2341414613 --> @vills commented on GitHub (Sep 10, 2024): @tjbck as i can see there is already a pull request to support Ollama's batch processing endpoint. Could you look at it please? https://github.com/open-webui/open-webui/pull/4715
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13907