pub struct LLMClient { /* private fields */ }Implementations§
Source§impl LLMClient
impl LLMClient
pub fn new() -> Result<Self>
pub fn new_with_project_root(project_root: PathBuf) -> Result<Self>
Sourcepub fn smart_model_info(&self, model_override: Option<&str>) -> ModelInfo
pub fn smart_model_info(&self, model_override: Option<&str>) -> ModelInfo
Get info about the smart model that will be used
Sourcepub fn fast_model_info(&self, model_override: Option<&str>) -> ModelInfo
pub fn fast_model_info(&self, model_override: Option<&str>) -> ModelInfo
Get info about the fast model that will be used
pub async fn complete(&self, prompt: &str) -> Result<String>
Sourcepub async fn complete_smart(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<String>
pub async fn complete_smart( &self, prompt: &str, model_override: Option<&str>, ) -> Result<String>
Complete using the smart model (for validation/analysis tasks with large context) Use user override if provided, otherwise fall back to configured smart_model
Sourcepub async fn complete_fast(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<String>
pub async fn complete_fast( &self, prompt: &str, model_override: Option<&str>, ) -> Result<String>
Complete using the fast model (for generation tasks) Use user override if provided, otherwise fall back to configured fast_model
pub async fn complete_with_model( &self, prompt: &str, model_override: Option<&str>, provider_override: Option<&str>, ) -> Result<String>
pub async fn complete_json<T>(&self, prompt: &str) -> Result<T>where
T: DeserializeOwned,
Sourcepub async fn complete_json_smart<T>(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<T>where
T: DeserializeOwned,
pub async fn complete_json_smart<T>(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<T>where
T: DeserializeOwned,
Complete JSON using the smart model (for validation/analysis tasks)
Sourcepub async fn complete_json_fast<T>(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<T>where
T: DeserializeOwned,
pub async fn complete_json_fast<T>(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<T>where
T: DeserializeOwned,
Complete JSON using the fast model (for generation tasks)
pub async fn complete_json_with_model<T>(
&self,
prompt: &str,
model_override: Option<&str>,
) -> Result<T>where
T: DeserializeOwned,
Auto Trait Implementations§
impl Freeze for LLMClient
impl !RefUnwindSafe for LLMClient
impl Send for LLMClient
impl Sync for LLMClient
impl Unpin for LLMClient
impl !UnwindSafe for LLMClient
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> 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