pub enum RerankParam {
Rerank25,
Rerank25Lite,
None,
}Expand description
The rerank request parameter: which Voyage model to rerank with, or none.
Omitting the parameter defaults to the full model (rerank-2.5). Clients
reranking locally always send none (one rerank pass, structurally).
Variants§
Rerank25
VoyageAI rerank-2.5 (the default; full quality).
Rerank25Lite
VoyageAI rerank-2.5-lite (lower latency; billed at half tokens, D5).
None
No server-side reranking (RRF order).
Implementations§
Source§impl RerankParam
impl RerankParam
Sourcepub const fn model_name(self) -> Option<&'static str>
pub const fn model_name(self) -> Option<&'static str>
The Voyage model name to call, or None when reranking is off.
Sourcepub const fn billed_tokens(self, total_tokens: u64) -> u64
pub const fn billed_tokens(self, total_tokens: u64) -> u64
Billed-equivalent tokens for a Voyage-reported total_tokens (D5):
rerank-2.5-lite is charged at ceil(total / 2) — mirroring Voyage’s
half-rate pricing for lite — everything else at face value.
Trait Implementations§
Source§impl Clone for RerankParam
impl Clone for RerankParam
Source§fn clone(&self) -> RerankParam
fn clone(&self) -> RerankParam
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RerankParam
Source§impl Debug for RerankParam
impl Debug for RerankParam
Source§impl Default for RerankParam
impl Default for RerankParam
Source§fn default() -> RerankParam
fn default() -> RerankParam
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RerankParam
impl<'de> Deserialize<'de> for RerankParam
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RerankParam
Source§impl PartialEq for RerankParam
impl PartialEq for RerankParam
Source§fn eq(&self, other: &RerankParam) -> bool
fn eq(&self, other: &RerankParam) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RerankParam
impl Serialize for RerankParam
impl StructuralPartialEq for RerankParam
Auto Trait Implementations§
impl Freeze for RerankParam
impl RefUnwindSafe for RerankParam
impl Send for RerankParam
impl Sync for RerankParam
impl Unpin for RerankParam
impl UnsafeUnpin for RerankParam
impl UnwindSafe for RerankParam
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.