pub trait AgentProvider:
Send
+ Sync
+ 'static {
// Required methods
fn supports(&self, capability: &str) -> bool;
fn invoke<'a>(
&'a self,
request: ProviderRequest,
cancellation: CancellationToken,
) -> ProviderFuture<'a>;
// Provided method
fn invoke_with_events<'a>(
&'a self,
request: ProviderRequest,
cancellation: CancellationToken,
_events: ProviderEventSink,
) -> ProviderFuture<'a> { ... }
}Expand description
Runtime-selected provider implementation.
Providers are registered dynamically by name. A provider may hold credentials internally, but credentials must never be placed in agent definitions, invocation metadata, snapshots, or returned trace attributes.
Required Methods§
fn supports(&self, capability: &str) -> bool
fn invoke<'a>( &'a self, request: ProviderRequest, cancellation: CancellationToken, ) -> ProviderFuture<'a>
Provided Methods§
fn invoke_with_events<'a>( &'a self, request: ProviderRequest, cancellation: CancellationToken, _events: ProviderEventSink, ) -> ProviderFuture<'a>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl AgentProvider for HttpCapabilityProvider
impl AgentProvider for LocalWhisperProvider
Available on crate feature
local-whisper only.