Implemented Ollama as an embeddings provider

Initial prototype of Ollama embeddings actually working, error handlign / retries still missing.

Allow model to be any String and require dimensions parameter

Fixed rustfmt formatting issues

There were some formatting issues in the initial PR and this should not make the changes comply with the Rust style guidelines

Because I accidentally didn't follow the style guide for commits in my commit messages I squashed them into one to comply
This commit is contained in:
Jakob Klemm 2024-03-03 01:11:25 +01:00
parent 938149f814
commit d3004d8040
No known key found for this signature in database
GPG key ID: D91BAB52F26F2A75
7 changed files with 350 additions and 15 deletions

View file

@ -604,6 +604,7 @@ fn embedder_analytics(
EmbedderSource::OpenAi => sources.insert("openAi"),
EmbedderSource::HuggingFace => sources.insert("huggingFace"),
EmbedderSource::UserProvided => sources.insert("userProvided"),
EmbedderSource::Ollama => sources.insert("ollama"),
};
}
};