pub struct RigEmbeddingModelAdapter { /* private fields */ }Implementations§
Source§impl RigEmbeddingModelAdapter
impl RigEmbeddingModelAdapter
pub fn new(inner: Arc<dyn DynEmbeddingModel>) -> Self
Trait Implementations§
Source§impl Clone for RigEmbeddingModelAdapter
impl Clone for RigEmbeddingModelAdapter
Source§fn clone(&self) -> RigEmbeddingModelAdapter
fn clone(&self) -> RigEmbeddingModelAdapter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RigEmbeddingModelAdapter
impl EmbeddingModel for RigEmbeddingModelAdapter
Source§const MAX_DOCUMENTS: usize = 1000
const MAX_DOCUMENTS: usize = 1000
The maximum number of documents that can be embedded in a single request.
type Client = ()
fn make( _client: &Self::Client, _model: impl Into<String>, _dims: Option<usize>, ) -> Self
Source§async fn embed_texts(
&self,
texts: impl IntoIterator<Item = String> + WasmCompatSend,
) -> Result<Vec<Embedding>, EmbeddingError>
async fn embed_texts( &self, texts: impl IntoIterator<Item = String> + WasmCompatSend, ) -> Result<Vec<Embedding>, EmbeddingError>
Embed multiple text documents in a single request
Source§async fn embed_text(&self, input: &str) -> Result<Embedding, EmbeddingError>
async fn embed_text(&self, input: &str) -> Result<Embedding, EmbeddingError>
Embed a single text document.
Source§impl From<Arc<dyn DynEmbeddingModel>> for RigEmbeddingModelAdapter
impl From<Arc<dyn DynEmbeddingModel>> for RigEmbeddingModelAdapter
Source§fn from(value: Arc<dyn DynEmbeddingModel>) -> Self
fn from(value: Arc<dyn DynEmbeddingModel>) -> Self
Converts to this type from the input type.
Source§impl From<Box<dyn DynEmbeddingModel>> for RigEmbeddingModelAdapter
impl From<Box<dyn DynEmbeddingModel>> for RigEmbeddingModelAdapter
Source§fn from(value: Box<dyn DynEmbeddingModel>) -> Self
fn from(value: Box<dyn DynEmbeddingModel>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RigEmbeddingModelAdapter
impl !RefUnwindSafe for RigEmbeddingModelAdapter
impl Send for RigEmbeddingModelAdapter
impl Sync for RigEmbeddingModelAdapter
impl Unpin for RigEmbeddingModelAdapter
impl UnsafeUnpin for RigEmbeddingModelAdapter
impl !UnwindSafe for RigEmbeddingModelAdapter
Blanket Implementations§
Source§impl<T> EmbeddingModelDyn for T
impl<T> EmbeddingModelDyn for T
Source§fn max_documents(&self) -> usize
fn max_documents(&self) -> usize
👎Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
Source§fn ndims(&self) -> usize
fn ndims(&self) -> usize
👎Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
Source§fn embed_text<'a>(
&'a self,
text: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Embedding, EmbeddingError>> + Send + 'a>>
fn embed_text<'a>( &'a self, text: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Embedding, EmbeddingError>> + Send + 'a>>
👎Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
Source§fn embed_texts(
&self,
texts: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send + '_>>
fn embed_texts( &self, texts: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send + '_>>
👎Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
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