pub struct EmbeddingOptions {
pub input_type: Option<String>,
pub truncation: Option<bool>,
pub output_dimension: Option<usize>,
}Expand description
Optional request parameters for Voyage AI embedding calls.
All fields default to None, which matches Voyage’s own server defaults:
no input_type, truncation enabled, and the model’s default output
dimension.
TODO: output_dtype (float | int8 | uint8 | binary | ubinary) is
intentionally not implemented yet. Quantized dtypes return integer vectors
instead of floats, so they need a separate response-parsing change before
they can be supported here.
Fields§
§input_type: Option<String>Prepends a retrieval prompt to the input text. Use "document" when
embedding stored chunks and "query" when embedding search queries.
Embeddings produced with and without input_type are compatible.
truncation: Option<bool>Whether to truncate inputs that exceed the model’s maximum context
length. Voyage’s server default is true.
output_dimension: Option<usize>Dimensionality of the returned embeddings. Defaults to the model’s default output dimension when unset.
Trait Implementations§
Source§impl Clone for EmbeddingOptions
impl Clone for EmbeddingOptions
Source§fn clone(&self) -> EmbeddingOptions
fn clone(&self) -> EmbeddingOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EmbeddingOptions
impl Debug for EmbeddingOptions
Source§impl Default for EmbeddingOptions
impl Default for EmbeddingOptions
Source§fn default() -> EmbeddingOptions
fn default() -> EmbeddingOptions
impl Eq for EmbeddingOptions
Source§impl PartialEq for EmbeddingOptions
impl PartialEq for EmbeddingOptions
impl StructuralPartialEq for EmbeddingOptions
Auto Trait Implementations§
impl Freeze for EmbeddingOptions
impl RefUnwindSafe for EmbeddingOptions
impl Send for EmbeddingOptions
impl Sync for EmbeddingOptions
impl Unpin for EmbeddingOptions
impl UnsafeUnpin for EmbeddingOptions
impl UnwindSafe for EmbeddingOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more