pub struct LlmEmbedding { /* private fields */ }Implementations§
Source§impl LlmEmbedding
impl LlmEmbedding
Sourcepub fn detect_available() -> Result<Self, AppError>
pub fn detect_available() -> Result<Self, AppError>
Detects which LLM CLI is available on PATH and returns the matching embedding client.
v1.0.76: PREFERS codex over claude because:
- Claude Code 2.1+ ships a 180k+ token system context (plugins, skills, agents, MCP) that overflows the 200k context window for even trivial embedding prompts and returns “Prompt is too long”.
- Codex 0.134+ is lightweight (~5k system context) and the
StructuredOutputtool reliably returns 384-dim vectors.
pub fn with_codex() -> Result<Self, AppError>
pub fn with_claude() -> Result<Self, AppError>
Trait Implementations§
Source§impl Clone for LlmEmbedding
impl Clone for LlmEmbedding
Source§fn clone(&self) -> LlmEmbedding
fn clone(&self) -> LlmEmbedding
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 moreAuto Trait Implementations§
impl Freeze for LlmEmbedding
impl RefUnwindSafe for LlmEmbedding
impl Send for LlmEmbedding
impl Sync for LlmEmbedding
impl Unpin for LlmEmbedding
impl UnsafeUnpin for LlmEmbedding
impl UnwindSafe for LlmEmbedding
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> 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>
Converts
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>
Converts
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