Struct langchain_rust::embedding::TextEmbedding
source · pub struct TextEmbedding { /* private fields */ }Expand description
Rust representation of the TextEmbedding model
Implementations§
source§impl TextEmbedding
impl TextEmbedding
sourcepub fn try_new(options: InitOptions) -> Result<TextEmbedding, Error>
pub fn try_new(options: InitOptions) -> Result<TextEmbedding, Error>
Try to generate a new TextEmbedding Instance
Uses the highest level of Graph optimization
Uses the total number of CPUs available as the number of intra-threads
sourcepub fn try_new_from_user_defined(
model: UserDefinedEmbeddingModel,
options: InitOptionsUserDefined
) -> Result<TextEmbedding, Error>
pub fn try_new_from_user_defined( model: UserDefinedEmbeddingModel, options: InitOptionsUserDefined ) -> Result<TextEmbedding, Error>
Create a TextEmbedding instance from model files provided by the user.
This can be used for ‘bring your own’ embedding models
sourcepub fn list_supported_models() -> Vec<ModelInfo>
pub fn list_supported_models() -> Vec<ModelInfo>
Retrieve a list of supported models
sourcepub fn get_model_info(model: &EmbeddingModel) -> ModelInfo
pub fn get_model_info(model: &EmbeddingModel) -> ModelInfo
Get ModelInfo from EmbeddingModel
Trait Implementations§
source§impl From<TextEmbedding> for FastEmbed
impl From<TextEmbedding> for FastEmbed
source§fn from(model: TextEmbedding) -> Self
fn from(model: TextEmbedding) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for TextEmbedding
impl RefUnwindSafe for TextEmbedding
impl Send for TextEmbedding
impl Sync for TextEmbedding
impl Unpin for TextEmbedding
impl UnwindSafe for TextEmbedding
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