pub struct LlmEmbeddingBuilder { /* private fields */ }Expand description
ADR-0042 / GAP-002: builder for LlmEmbedding that lets callers
override the binary path and model without having to remember the
env-var names per flavour. Replaces the duplicated with_codex /
with_claude bodies that diverged in v1.0.82 (GAP-002: the Claude
arm of embed_via_backend re-did the PATH probe via
LlmEmbedding::detect_available and could silently pick codex).
Implementations§
Source§impl LlmEmbeddingBuilder
impl LlmEmbeddingBuilder
Sourcepub fn claude_default() -> Self
pub fn claude_default() -> Self
Convenience: produce a Claude-backed builder pre-configured with the canonical default binary + model. Convenience: produce a Claude-backed builder pre-configured with the canonical default binary + model.
Sourcepub fn codex_default() -> Self
pub fn codex_default() -> Self
Convenience: produce a Codex-backed builder pre-configured with the canonical default binary + model.
Sourcepub fn override_binary(self, binary: PathBuf) -> Self
pub fn override_binary(self, binary: PathBuf) -> Self
Override the binary path (skips the which::which PATH probe).
Sourcepub fn override_model(self, model: String) -> Self
pub fn override_model(self, model: String) -> Self
Override the model name (skips the env-var lookup).
Sourcepub fn build(self) -> Result<LlmEmbedding, AppError>
pub fn build(self) -> Result<LlmEmbedding, AppError>
Build the LlmEmbedding. Enforces OAuth-only and resolves the
binary/model via the override or the env-var defaults.
Trait Implementations§
Source§impl Clone for LlmEmbeddingBuilder
impl Clone for LlmEmbeddingBuilder
Source§fn clone(&self) -> LlmEmbeddingBuilder
fn clone(&self) -> LlmEmbeddingBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for LlmEmbeddingBuilder
impl RefUnwindSafe for LlmEmbeddingBuilder
impl Send for LlmEmbeddingBuilder
impl Sync for LlmEmbeddingBuilder
impl Unpin for LlmEmbeddingBuilder
impl UnsafeUnpin for LlmEmbeddingBuilder
impl UnwindSafe for LlmEmbeddingBuilder
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,
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