pub struct AnthropicProvider {
pub base_url: String,
pub http: Client,
}Expand description
Speaks POST {base}/v1/messages (Anthropic Messages API).
Fields§
§base_url: StringBase URL, e.g. https://api.anthropic.com.
http: ClientShared, connection-pooled HTTP client.
Trait Implementations§
Source§impl Clone for AnthropicProvider
impl Clone for AnthropicProvider
Source§fn clone(&self) -> AnthropicProvider
fn clone(&self) -> AnthropicProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnthropicProvider
impl Debug for AnthropicProvider
Source§impl Provider for AnthropicProvider
impl Provider for AnthropicProvider
Source§fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 ModelRequest,
auth: &'life2 Auth,
) -> Pin<Box<dyn Future<Output = Result<ModelResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 ModelRequest,
auth: &'life2 Auth,
) -> Pin<Box<dyn Future<Output = Result<ModelResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Call the model and normalize the result. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AnthropicProvider
impl !UnwindSafe for AnthropicProvider
impl Freeze for AnthropicProvider
impl Send for AnthropicProvider
impl Sync for AnthropicProvider
impl Unpin for AnthropicProvider
impl UnsafeUnpin for AnthropicProvider
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