pub struct CohereProvider { /* private fields */ }Expand description
Cohere provider
Implementations§
Source§impl CohereProvider
impl CohereProvider
Sourcepub fn for_embeddings(api_key: String) -> Self
pub fn for_embeddings(api_key: String) -> Self
Create a provider specifically for embeddings
Sourcepub fn with_base_url(self, base_url: String) -> Self
pub fn with_base_url(self, base_url: String) -> Self
Set custom base URL
Trait Implementations§
Source§impl EmbeddingProvider for CohereProvider
impl EmbeddingProvider for CohereProvider
fn embed<'life0, 'async_trait>(
&'life0 self,
request: EmbeddingRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl LlmProvider for CohereProvider
impl LlmProvider for CohereProvider
fn complete<'life0, 'async_trait>(
&'life0 self,
request: LlmRequest,
) -> Pin<Box<dyn Future<Output = Result<LlmResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl StreamingLlmProvider for CohereProvider
impl StreamingLlmProvider for CohereProvider
Source§fn complete_stream<'life0, 'async_trait>(
&'life0 self,
request: LlmRequest,
) -> Pin<Box<dyn Future<Output = Result<LlmStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_stream<'life0, 'async_trait>(
&'life0 self,
request: LlmRequest,
) -> Pin<Box<dyn Future<Output = Result<LlmStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream completion responses token-by-token
Auto Trait Implementations§
impl Freeze for CohereProvider
impl !RefUnwindSafe for CohereProvider
impl Send for CohereProvider
impl Sync for CohereProvider
impl Unpin for CohereProvider
impl !UnwindSafe for CohereProvider
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