pub struct EmbeddingModel { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Clone for EmbeddingModel
impl Clone for EmbeddingModel
Source§fn clone(&self) -> EmbeddingModel
fn clone(&self) -> EmbeddingModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl EmbeddingModel for EmbeddingModel
impl EmbeddingModel for EmbeddingModel
Source§async fn embed_texts(
&self,
documents: impl IntoIterator<Item = String> + Send,
) -> Result<Vec<Embedding>, EmbeddingError>
async fn embed_texts( &self, documents: impl IntoIterator<Item = String> + Send, ) -> Result<Vec<Embedding>, EmbeddingError>
Source§const MAX_DOCUMENTS: usize = 1_024usize
const MAX_DOCUMENTS: usize = 1_024usize
The maximum number of documents that can be embedded in a single request.
Source§fn embed_text(
&self,
text: &str,
) -> impl Future<Output = Result<Embedding, EmbeddingError>> + Send
fn embed_text( &self, text: &str, ) -> impl Future<Output = Result<Embedding, EmbeddingError>> + Send
Embed a single text document.
Auto Trait Implementations§
impl Freeze for EmbeddingModel
impl !RefUnwindSafe for EmbeddingModel
impl Send for EmbeddingModel
impl Sync for EmbeddingModel
impl Unpin for EmbeddingModel
impl !UnwindSafe for EmbeddingModel
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