pub struct Embeddings { /* private fields */ }
Implementations§
Source§impl Embeddings
impl Embeddings
pub fn for_client(client: Client<OpenAIConfig>, model: &str) -> Self
Trait Implementations§
Source§impl Default for Embeddings
impl Default for Embeddings
Source§impl Embeddings for Embeddings
impl Embeddings for Embeddings
type Error = OpenAIEmbeddingsError
fn embed_texts<'life0, 'async_trait>(
&'life0 self,
texts: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn embed_query<'life0, 'async_trait>(
&'life0 self,
query: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for Embeddings
impl !RefUnwindSafe for Embeddings
impl Send for Embeddings
impl Sync for Embeddings
impl Unpin for Embeddings
impl !UnwindSafe for Embeddings
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