pub struct BackendChoice {
pub llm: LlmBackendChoice,
pub embedding: EmbeddingBackendChoice,
}Expand description
The llm + embedding pair, named once.
GAP-SG-265: these two selectors are resolved together in main, travel
together down every write path, and are consumed together by
embed_passage_with_embedding_choice. Passing them as two positional
parameters cost one argument slot in each of the signatures that carry them,
and several of those signatures sat one slot over the
clippy::too_many_arguments threshold for exactly that reason.
This is a plain aggregate on purpose: the two fields keep their own types,
so nothing that reads them changes, and the struct is Copy so threading it
through a call chain stays as cheap as threading the two enums was.
Fields§
§llm: LlmBackendChoiceWhich LLM backend answers enrichment calls.
embedding: EmbeddingBackendChoiceWhich backend computes embeddings.
Implementations§
Source§impl BackendChoice
impl BackendChoice
Sourcepub fn new(llm: LlmBackendChoice, embedding: EmbeddingBackendChoice) -> Self
pub fn new(llm: LlmBackendChoice, embedding: EmbeddingBackendChoice) -> Self
Builds the pair from the two CLI selectors.
Trait Implementations§
Source§impl Clone for BackendChoice
impl Clone for BackendChoice
Source§fn clone(&self) -> BackendChoice
fn clone(&self) -> BackendChoice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BackendChoice
Source§impl Debug for BackendChoice
impl Debug for BackendChoice
impl Eq for BackendChoice
Source§impl PartialEq for BackendChoice
impl PartialEq for BackendChoice
impl StructuralPartialEq for BackendChoice
Auto Trait Implementations§
impl Freeze for BackendChoice
impl RefUnwindSafe for BackendChoice
impl Send for BackendChoice
impl Sync for BackendChoice
impl Unpin for BackendChoice
impl UnsafeUnpin for BackendChoice
impl UnwindSafe for BackendChoice
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
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