#[non_exhaustive]pub enum Provider {
Ollama,
Voyage,
OpenAi,
Gemini,
}Expand description
Which embeddings backend a Client talks to.
#[non_exhaustive]: more providers can be added in a minor release, so match
with a _ => arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ollama
A local Ollama server ({base_url}/api/embed, default
http://localhost:11434). No API key, works offline; ignores
EmbedKind.
Voyage
Voyage AI ({base_url}/embeddings, default https://api.voyageai.com/v1).
Needs VOYAGE_API_KEY_ENV; honours input_type (EmbedKind) and
output_dimension.
OpenAi
OpenAI, or any OpenAI-compatible /v1/embeddings endpoint (together.ai,
vLLM, LocalAI, …) via a base_url override. Default
https://api.openai.com/v1. Needs OPENAI_API_KEY_ENV; honours
dimensions (ClientBuilder::output_dimension). Symmetric - ignores
EmbedKind.
Gemini
Google Gemini (Generative Language API,
{base_url}/models/{model}:batchEmbedContents, default
https://generativelanguage.googleapis.com/v1beta). Needs
GEMINI_API_KEY_ENV; maps EmbedKind to taskType and honours
outputDimensionality.
Trait Implementations§
impl Copy for Provider
impl Eq for Provider
impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.