You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apiKey
Authentication token Meilisearch should send with each request to the embedder.
This field is mandatory if using a protected rest embedder.
This field is optional for openAI and ollama embedders. If you don't specify apiKey, Meilisearch will attempt to read it from environment variables OPENAI_API_KEY and MEILI_OLLAMA_URL, respectively.
(emphasis mine)
I checked the source code, that env variable appears in
fnget_ollama_path() -> String{// Important: Hostname not enough, has to be entire path to embeddings endpoint
std::env::var("MEILI_OLLAMA_URL").unwrap_or("http://localhost:11434/api/embeddings".to_string())}
It only gets called once:
let url = self.url.unwrap_or_else(get_ollama_path);
I cannot see how it interacts with the api key, if at all. This probably belongs in the documentation for the url parameter.
I don't use AI in anything, so I thought I'd post here just in case I'm misinterpreting something.
The text was updated successfully, but these errors were encountered:
@ellnix is correct, MEILI_OLLAMA_URL is used to infer the url parameter of ollama embedders if that parameter is unspecified.
AFAIK ollama does not support authentication by itself, it has to be provided by a proxy. We support apiKey for ollama (it adds an authentication header with a classic Bearer scheme), but this doesn't actually work without a proxy to support the authentication, so we're not also adding an env variable.
I checked the source code, that env variable appears in
It only gets called once:
I cannot see how it interacts with the api key, if at all. This probably belongs in the documentation for the
url
parameter.I don't use AI in anything, so I thought I'd post here just in case I'm misinterpreting something.
The text was updated successfully, but these errors were encountered: