pub struct AnthropicBackend { /* private fields */ }Expand description
Anthropic Messages API backend.
Implementations§
Source§impl AnthropicBackend
impl AnthropicBackend
Sourcepub fn from_env() -> SummarizerResult<Self>
pub fn from_env() -> SummarizerResult<Self>
Construct from crate::ANTHROPIC_API_KEY_ENV.
Trait Implementations§
Source§impl CompletionBackend for AnthropicBackend
impl CompletionBackend for AnthropicBackend
Source§fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model: &'life1 str,
system: &'life2 str,
user: &'life3 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = SummarizerResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model: &'life1 str,
system: &'life2 str,
user: &'life3 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = SummarizerResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Run a single completion with system and user prompts.
Auto Trait Implementations§
impl !RefUnwindSafe for AnthropicBackend
impl !UnwindSafe for AnthropicBackend
impl Freeze for AnthropicBackend
impl Send for AnthropicBackend
impl Sync for AnthropicBackend
impl Unpin for AnthropicBackend
impl UnsafeUnpin for AnthropicBackend
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