pub struct OpenAiEmbeddings { /* private fields */ }Implementations§
Source§impl OpenAiEmbeddings
impl OpenAiEmbeddings
pub fn new( config: OpenAiEmbeddingsConfig, backend: Arc<dyn ProviderBackend>, ) -> OpenAiEmbeddings
Trait Implementations§
Source§impl Embeddings for OpenAiEmbeddings
impl Embeddings for OpenAiEmbeddings
Source§fn embed_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, SynapticError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
OpenAiEmbeddings: 'async_trait,
fn embed_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, SynapticError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
OpenAiEmbeddings: 'async_trait,
Embed multiple texts (for batch document embedding).
Source§fn embed_query<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, SynapticError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
OpenAiEmbeddings: 'async_trait,
fn embed_query<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, SynapticError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
OpenAiEmbeddings: 'async_trait,
Embed a single query text.
Auto Trait Implementations§
impl Freeze for OpenAiEmbeddings
impl !RefUnwindSafe for OpenAiEmbeddings
impl Send for OpenAiEmbeddings
impl Sync for OpenAiEmbeddings
impl Unpin for OpenAiEmbeddings
impl UnsafeUnpin for OpenAiEmbeddings
impl !UnwindSafe for OpenAiEmbeddings
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