pub struct LlmCliClient { /* private fields */ }Expand description
LLM CLI Client for multi-model orchestration
Implementations§
Source§impl LlmCliClient
impl LlmCliClient
Sourcepub fn with_config(config: LlmCliConfig) -> Self
pub fn with_config(config: LlmCliConfig) -> Self
Create a new LLM CLI client with custom configuration
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if the LLM CLI is available
Sourcepub fn list_models(&self) -> Result<Vec<String>>
pub fn list_models(&self) -> Result<Vec<String>>
List available models
Sourcepub fn prompt(&self, text: &str, model: Option<&str>) -> Result<PromptResult>
pub fn prompt(&self, text: &str, model: Option<&str>) -> Result<PromptResult>
Execute a prompt with the LLM CLI
Sourcepub fn prompt_with_system(
&self,
text: &str,
system: &str,
model: Option<&str>,
) -> Result<PromptResult>
pub fn prompt_with_system( &self, text: &str, system: &str, model: Option<&str>, ) -> Result<PromptResult>
Execute a prompt with system message
Sourcepub fn embed(
&self,
text: &str,
config: Option<&EmbeddingConfig>,
) -> Result<EmbeddingResult>
pub fn embed( &self, text: &str, config: Option<&EmbeddingConfig>, ) -> Result<EmbeddingResult>
Generate embeddings for text
Sourcepub fn cluster(
&self,
input: &str,
num_clusters: usize,
config: Option<&ClusterConfig>,
) -> Result<ClusterResult>
pub fn cluster( &self, input: &str, num_clusters: usize, config: Option<&ClusterConfig>, ) -> Result<ClusterResult>
Cluster documents
Sourcepub fn similar(
&self,
query: &str,
collection: &str,
top_k: usize,
) -> Result<SimilarityResult>
pub fn similar( &self, query: &str, collection: &str, top_k: usize, ) -> Result<SimilarityResult>
Perform similarity search
Sourcepub fn rag(&self, query: &str, config: &RagConfig) -> Result<PromptResult>
pub fn rag(&self, query: &str, config: &RagConfig) -> Result<PromptResult>
Execute a RAG pipeline
Sourcepub fn prompt_with_template(
&self,
template: &str,
variables: &[(&str, &str)],
model: Option<&str>,
) -> Result<PromptResult>
pub fn prompt_with_template( &self, template: &str, variables: &[(&str, &str)], model: Option<&str>, ) -> Result<PromptResult>
Execute a prompt using a template
Trait Implementations§
Source§impl Clone for LlmCliClient
impl Clone for LlmCliClient
Source§fn clone(&self) -> LlmCliClient
fn clone(&self) -> LlmCliClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LlmCliClient
impl Debug for LlmCliClient
Auto Trait Implementations§
impl Freeze for LlmCliClient
impl RefUnwindSafe for LlmCliClient
impl Send for LlmCliClient
impl Sync for LlmCliClient
impl Unpin for LlmCliClient
impl UnwindSafe for LlmCliClient
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,
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