pub struct EmbedRequest {
pub inputs: Vec<EmbedInput>,
pub dimensions: Option<usize>,
pub task_instruction: Option<String>,
pub normalize: bool,
}Expand description
Request for embedding operation.
Fields§
§inputs: Vec<EmbedInput>Inputs to embed.
dimensions: Option<usize>Desired embedding dimensions (if configurable). Qwen3-VL supports configurable dimensions.
task_instruction: Option<String>Task-specific instruction for the embedder. Helps the model understand the embedding purpose.
normalize: boolWhether to normalize the output vectors.
Implementations§
Source§impl EmbedRequest
impl EmbedRequest
Sourcepub fn new(inputs: Vec<EmbedInput>) -> Self
pub fn new(inputs: Vec<EmbedInput>) -> Self
Creates a new embedding request.
Sourcepub fn with_dimensions(self, dim: usize) -> Self
pub fn with_dimensions(self, dim: usize) -> Self
Sets the desired dimensions.
Sourcepub fn with_normalize(self, normalize: bool) -> Self
pub fn with_normalize(self, normalize: bool) -> Self
Sets normalization preference.
Trait Implementations§
Source§impl Clone for EmbedRequest
impl Clone for EmbedRequest
Source§fn clone(&self) -> EmbedRequest
fn clone(&self) -> EmbedRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EmbedRequest
impl RefUnwindSafe for EmbedRequest
impl Send for EmbedRequest
impl Sync for EmbedRequest
impl Unpin for EmbedRequest
impl UnwindSafe for EmbedRequest
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