pub struct CohereEmbeddingsConfig {
pub api_key: String,
pub base_url: String,
pub model: String,
pub input_type: CohereEmbedInputType,
}Expand description
Cohere embedding configuration.
Fields§
§api_key: StringCohere API key.
base_url: StringBase URL for the Cohere embeddings API.
model: StringEmbedding model name.
input_type: CohereEmbedInputTypeInput type for the embedding request.
Implementations§
Source§impl CohereEmbeddingsConfig
impl CohereEmbeddingsConfig
Sourcepub fn from_env_result() -> Result<Self, EmbeddingError>
pub fn from_env_result() -> Result<Self, EmbeddingError>
Creates config from environment variables.
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Sets the model name.
Sourcepub fn with_input_type(self, input_type: CohereEmbedInputType) -> Self
pub fn with_input_type(self, input_type: CohereEmbedInputType) -> Self
Sets the input type.
Trait Implementations§
Source§impl Clone for CohereEmbeddingsConfig
impl Clone for CohereEmbeddingsConfig
Source§fn clone(&self) -> CohereEmbeddingsConfig
fn clone(&self) -> CohereEmbeddingsConfig
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 CohereEmbeddingsConfig
impl Debug for CohereEmbeddingsConfig
Auto Trait Implementations§
impl Freeze for CohereEmbeddingsConfig
impl RefUnwindSafe for CohereEmbeddingsConfig
impl Send for CohereEmbeddingsConfig
impl Sync for CohereEmbeddingsConfig
impl Unpin for CohereEmbeddingsConfig
impl UnsafeUnpin for CohereEmbeddingsConfig
impl UnwindSafe for CohereEmbeddingsConfig
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