pub struct FixedVectorProvider {
pub id: String,
pub model_id: String,
pub model_version: String,
pub normalization: EmbeddingNormalization,
pub vector: Vec<f32>,
pub provider_version: String,
pub model_artifact_sha256: Option<[u8; 32]>,
pub tokenizer_sha256: Option<[u8; 32]>,
pub preprocessing_sha256: Option<[u8; 32]>,
}Fields§
§id: String§model_id: String§model_version: String§normalization: EmbeddingNormalization§vector: Vec<f32>§provider_version: String§model_artifact_sha256: Option<[u8; 32]>§tokenizer_sha256: Option<[u8; 32]>§preprocessing_sha256: Option<[u8; 32]>Implementations§
Source§impl FixedVectorProvider
impl FixedVectorProvider
pub fn new( id: impl Into<String>, model_id: impl Into<String>, model_version: impl Into<String>, normalization: EmbeddingNormalization, vector: Vec<f32>, ) -> FixedVectorProvider
pub fn with_artifact_sha256(self, sha: [u8; 32]) -> FixedVectorProvider
Trait Implementations§
Source§impl Clone for FixedVectorProvider
impl Clone for FixedVectorProvider
Source§fn clone(&self) -> FixedVectorProvider
fn clone(&self) -> FixedVectorProvider
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 Debug for FixedVectorProvider
impl Debug for FixedVectorProvider
Source§impl EmbeddingProvider for FixedVectorProvider
impl EmbeddingProvider for FixedVectorProvider
fn provider_id(&self) -> &str
fn model_id(&self) -> &str
fn model_version(&self) -> &str
fn dimension(&self) -> u32
fn normalization(&self) -> EmbeddingNormalization
fn preprocessing_version(&self) -> &str
fn provider_version(&self) -> &str
fn model_artifact_sha256(&self) -> [u8; 32]
fn tokenizer_sha256(&self) -> [u8; 32]
fn preprocessing_sha256(&self) -> [u8; 32]
Source§fn embed(
&self,
request: EmbeddingRequest<'_>,
) -> Result<EmbeddingResponse, EmbeddingError>
fn embed( &self, request: EmbeddingRequest<'_>, ) -> Result<EmbeddingResponse, EmbeddingError>
Controlled synchronous inference used by transactional generated
columns. Implementations must checkpoint during long work.
fn semantic_identity(&self) -> EmbeddingProviderRef
fn execution_mode(&self) -> ProviderExecutionMode
fn health(&self) -> ProviderHealth
Source§fn embed_async<'a>(
&'a self,
request: EmbeddingRequest<'a>,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse, EmbeddingError>> + Send + 'a>>
fn embed_async<'a>( &'a self, request: EmbeddingRequest<'a>, ) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse, EmbeddingError>> + Send + 'a>>
Async transport hook for remote providers. The default is suitable only
for short cooperative local inference; heavy local implementations must
override this and use a bounded blocking executor.
Auto Trait Implementations§
impl Freeze for FixedVectorProvider
impl RefUnwindSafe for FixedVectorProvider
impl Send for FixedVectorProvider
impl Sync for FixedVectorProvider
impl Unpin for FixedVectorProvider
impl UnsafeUnpin for FixedVectorProvider
impl UnwindSafe for FixedVectorProvider
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more