Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Wrong ollama embedding endpoint #494

Open
r0kk opened this issue Nov 15, 2024 · 5 comments
Open

[BUG] Wrong ollama embedding endpoint #494

r0kk opened this issue Nov 15, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@r0kk
Copy link

r0kk commented Nov 15, 2024

Description

Hi, I think you are calling the wrong endpoint for local embedding for ollama, if I use settings from your instructions here

From official ollama api documentation here it should be called: http://localhost:11434/api/embedd endpoint, but from koteamon it is called http://localhost:11434/api/embeddings

following works:
curl http://localhost:11434/api/embedd -d '{
"model": "",
"input": "Why is the sky blue?"
}'

following does not:
curl http://localhost:11434/api/embeddings-d '{
"model": "",
"input": "Why is the sky blue?"
}'

There is also a problem that on UI we don't get any notification about the issues and one has to look into the logs. It would be great if it could be a little bit more explicit.

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

No response

OS

No response

Additional information

No response

@r0kk r0kk added the bug Something isn't working label Nov 15, 2024
@taprosoft
Copy link
Collaborator

So the examples we used following Ollama OpenAI API specs https://github.com/ollama/ollama/blob/main/docs/openai.md#curl

Please use the Test connection feature to make sure the Ollama connection working properly for both LLM & embedding models.

@r0kk
Copy link
Author

r0kk commented Nov 15, 2024

It worked before, but ollama changed endpoints from /embeddings to /embed, so OpenAI client should not work anymore because it uses /embeddings. At least this is my understanding.
Screenshot 2024-11-15 125451

The openAI client endpoint:
Screenshot 2024-11-15 125809

@Neurozone
Copy link

Same issue here with ollama -v
ollama version is 0.4.1
and kotaemon full docker image

@arno4000
Copy link

+1

@vap0rtranz
Copy link

vap0rtranz commented Nov 18, 2024

Is this just an issue with Ollama v0.4?

ollama -v
ollama version is 0.3.9

Call from within Kotaemon app docker runtime:

root@justin-two-towers:/app# curl localhost:11434/api/embeddings -d '{ "model": "llama3.1:8b", "input": "Why is the sky blue?" }'
{"embedding":[]}

Seems fine ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants