pub struct SimpleAgentsClient { /* private fields */ }Expand description
Unified SimpleAgents client.
Implementations§
Source§impl SimpleAgentsClient
impl SimpleAgentsClient
Sourcepub fn new(provider: Arc<dyn Provider>) -> Self
pub fn new(provider: Arc<dyn Provider>) -> Self
Create a new client wrapping a single provider with default config and healing.
Sourcepub fn from_config(provider: Arc<dyn Provider>, config: ClientConfig) -> Self
pub fn from_config(provider: Arc<dyn Provider>, config: ClientConfig) -> Self
Create a new client from a ClientConfig, using the supplied provider.
Sourcepub fn with_healing(
provider: Arc<dyn Provider>,
healing: HealingSettings,
) -> Self
pub fn with_healing( provider: Arc<dyn Provider>, healing: HealingSettings, ) -> Self
Create a new client with custom healing settings.
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
Return a reference to the client’s configuration.
Sourcepub fn provider_name(&self) -> &str
pub fn provider_name(&self) -> &str
Return the name of the underlying provider.
Sourcepub async fn complete(
&self,
request: &CompletionRequest,
options: CompletionOptions,
) -> Result<CompletionOutcome>
pub async fn complete( &self, request: &CompletionRequest, options: CompletionOptions, ) -> Result<CompletionOutcome>
Execute a completion request.
Auto Trait Implementations§
impl Freeze for SimpleAgentsClient
impl !RefUnwindSafe for SimpleAgentsClient
impl Send for SimpleAgentsClient
impl Sync for SimpleAgentsClient
impl Unpin for SimpleAgentsClient
impl UnsafeUnpin for SimpleAgentsClient
impl !UnwindSafe for SimpleAgentsClient
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