pub struct AnthropicProvider { /* private fields */ }Expand description
Anthropic provider implementation
Implementations§
Trait Implementations§
Source§impl LlmProviderTrait for AnthropicProvider
impl LlmProviderTrait for AnthropicProvider
Source§fn generate_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: Option<usize>,
temperature: Option<f32>,
top_p: Option<f32>,
stop_sequences: Option<Vec<String>>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: Option<usize>,
temperature: Option<f32>,
top_p: Option<f32>,
stop_sequences: Option<Vec<String>>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate text completion
Source§fn generate_chat_completion<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
max_tokens: Option<usize>,
temperature: Option<f32>,
top_p: Option<f32>,
stop_sequences: Option<Vec<String>>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_chat_completion<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
max_tokens: Option<usize>,
temperature: Option<f32>,
top_p: Option<f32>,
stop_sequences: Option<Vec<String>>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate chat completion
Source§fn get_available_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_available_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get available models
Source§fn max_context_length(&self) -> usize
fn max_context_length(&self) -> usize
Get maximum context length
Auto Trait Implementations§
impl Freeze for AnthropicProvider
impl !RefUnwindSafe for AnthropicProvider
impl Send for AnthropicProvider
impl Sync for AnthropicProvider
impl Unpin for AnthropicProvider
impl UnsafeUnpin for AnthropicProvider
impl !UnwindSafe 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