Support of apiKey in Ollama embeddings provider
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: macOS 14.5
- Continue: v0.9.197 (pre-release)
- IDE: VSCode 1.92.1
- Model: nomic-embed-text
- config.json:
{
"embeddingsProvider": {
"provider": "ollama",
"model": "nomic-embed-text",
"apiBase": "https://remote-ollama-instance-behind-open-webui/ollama",
"apiKey": "api-token-from-open-webui"
}
}
Description
Ollama embeddings provider return 401 unauthorized. As i can see in OllamaEmbeddingsProvider.ts file there are no support of apiKey for Ollama when used as embeddings provider. Could you please add this header also?
To reproduce
No response
Log output
No response
Hi, try this it work
https://docs.openwebui.com/tutorial/continue-dev/
Hi, try this it work
https://docs.openwebui.com/tutorial/continue-dev/
It works with models and tabautocomplete sections, but not in embeddings.
@Le-Syl21 i just found out, that you encouraged me to try openai compatible api? for some reason i got 404 response from ollama in /v1/embeddings endpoint
"embeddingsProvider": {
"provider": "openai",
"model": "mxbai-embed-large",
"apiBase": "https://remote-ollama-instance-behind-open-webui/ollama/v1",
"apiKey": "api-token-from-open-webui"
}
"POST /ollama/v1/embeddings HTTP/1.1" 404 Not Found
According to the ollama docs for open-webui (http://open-webui/ollama/docs), there is no http://open-webui/ollama/v1/embeddings, And ollama has no v1 path in their api
There is an http://open-webui/ollama/api/embeddings which requires auth when it's enabled and expects the following in the request:
{
"model": "string",
"prompt": "string",
"options": {},
"keep_alive": "string"
}
@vills @andrew-stclair just made a fix here: https://github.com/continuedev/continue/commit/07853463c8b2b1d9b2de850bd47e28454db98a03
This will be in the next pre-release!