pub struct RemoteAnthropicProvider { /* private fields */ }Expand description
Remote provider that calls the Anthropic Messages API for text generation. Does not support embedding or reranking.
Requires the ANTHROPIC_API_KEY environment variable (or a custom env var
name via the api_key_env option).
Implementations§
Trait Implementations§
Source§impl Default for RemoteAnthropicProvider
impl Default for RemoteAnthropicProvider
Source§impl ModelProvider for RemoteAnthropicProvider
impl ModelProvider for RemoteAnthropicProvider
Source§fn provider_id(&self) -> &'static str
fn provider_id(&self) -> &'static str
Unique identifier for this provider (e.g.
"local/candle", "remote/openai").Source§fn capabilities(&self) -> ProviderCapabilities
fn capabilities(&self) -> ProviderCapabilities
Return the set of tasks this provider supports.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ModelAliasSpec,
) -> Pin<Box<dyn Future<Output = Result<LoadedModelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ModelAliasSpec,
) -> Pin<Box<dyn Future<Output = Result<LoadedModelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load (or connect to) a model described by
spec and return a type-erased
handle. Read moreAuto Trait Implementations§
impl !Freeze for RemoteAnthropicProvider
impl !RefUnwindSafe for RemoteAnthropicProvider
impl Send for RemoteAnthropicProvider
impl Sync for RemoteAnthropicProvider
impl Unpin for RemoteAnthropicProvider
impl !UnwindSafe for RemoteAnthropicProvider
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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