pub struct EmbeddingModel {
pub model: String,
/* private fields */
}
Fields§
§model: String
Implementations§
Trait Implementations§
source§impl Clone for EmbeddingModel
impl Clone for EmbeddingModel
source§fn clone(&self) -> EmbeddingModel
fn clone(&self) -> EmbeddingModel
Returns a copy of the value. Read more
1.6.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§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§async fn embed_documents(
&self,
documents: Vec<String>,
) -> Result<Vec<Embedding>, EmbeddingError>
async fn embed_documents( &self, documents: Vec<String>, ) -> Result<Vec<Embedding>, EmbeddingError>
Embed multiple documents in a single request
source§fn embed_document(
&self,
document: &str,
) -> impl Future<Output = Result<Embedding, EmbeddingError>> + Sendwhere
Self: Sync,
fn embed_document(
&self,
document: &str,
) -> impl Future<Output = Result<Embedding, EmbeddingError>> + Sendwhere
Self: Sync,
Embed a single 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)