pub struct EmbeddingGenerationOptions {
pub model: Option<String>,
pub dimensions: Option<u32>,
pub additional_properties: HashMap<String, Value>,
}Expand description
Common request settings for embedding generation.
All fields are optional. Provider-specific settings (e.g. OpenAI’s
encoding_format or user) ride in additional_properties, exactly
like ChatOptions::additional_properties —
upstream expresses the same extension point as per-provider TypedDict
subclasses.
Fields§
§model: Option<String>The embedding model to use; falls back to the client’s default.
dimensions: Option<u32>Requested output dimensionality, for models that support shortening
(e.g. text-embedding-3-*).
additional_properties: HashMap<String, Value>Provider-specific extras, forwarded by the provider converters that understand them.
Implementations§
Source§impl EmbeddingGenerationOptions
impl EmbeddingGenerationOptions
pub fn new() -> EmbeddingGenerationOptions
Sourcepub fn with_model(self, model: impl Into<String>) -> EmbeddingGenerationOptions
pub fn with_model(self, model: impl Into<String>) -> EmbeddingGenerationOptions
Builder: set the model.
Sourcepub fn with_dimensions(self, dimensions: u32) -> EmbeddingGenerationOptions
pub fn with_dimensions(self, dimensions: u32) -> EmbeddingGenerationOptions
Builder: set the requested output dimensionality.
Trait Implementations§
Source§impl Clone for EmbeddingGenerationOptions
impl Clone for EmbeddingGenerationOptions
Source§fn clone(&self) -> EmbeddingGenerationOptions
fn clone(&self) -> EmbeddingGenerationOptions
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 EmbeddingGenerationOptions
impl Debug for EmbeddingGenerationOptions
Source§impl Default for EmbeddingGenerationOptions
impl Default for EmbeddingGenerationOptions
Source§fn default() -> EmbeddingGenerationOptions
fn default() -> EmbeddingGenerationOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EmbeddingGenerationOptions
impl<'de> Deserialize<'de> for EmbeddingGenerationOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmbeddingGenerationOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmbeddingGenerationOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EmbeddingGenerationOptions
impl Serialize for EmbeddingGenerationOptions
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for EmbeddingGenerationOptions
Auto Trait Implementations§
impl Freeze for EmbeddingGenerationOptions
impl RefUnwindSafe for EmbeddingGenerationOptions
impl Send for EmbeddingGenerationOptions
impl Sync for EmbeddingGenerationOptions
impl Unpin for EmbeddingGenerationOptions
impl UnsafeUnpin for EmbeddingGenerationOptions
impl UnwindSafe for EmbeddingGenerationOptions
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