pub struct EmbeddingRequest {
pub model: String,
pub input: Value,
pub encoding_format: Option<String>,
pub user: Option<String>,
pub dimensions: Option<u32>,
pub rid: Option<String>,
pub log_metrics: Option<bool>,
}Fields§
§model: StringID of the model to use
input: ValueInput can be a string, array of strings, tokens, or batch inputs
encoding_format: Option<String>Optional encoding format (e.g., “float”, “base64”)
user: Option<String>Optional user identifier
dimensions: Option<u32>Optional number of dimensions for the embedding
rid: Option<String>SGLang extension: request id for tracking
log_metrics: Option<bool>SGLang extension: enable/disable logging of metrics for this request
Trait Implementations§
Source§impl Clone for EmbeddingRequest
impl Clone for EmbeddingRequest
Source§fn clone(&self) -> EmbeddingRequest
fn clone(&self) -> EmbeddingRequest
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 moreSource§impl Debug for EmbeddingRequest
impl Debug for EmbeddingRequest
Source§impl<'de> Deserialize<'de> for EmbeddingRequest
impl<'de> Deserialize<'de> for EmbeddingRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GenerationRequest for EmbeddingRequest
impl GenerationRequest for EmbeddingRequest
Source§impl JsonSchema for EmbeddingRequest
impl JsonSchema for EmbeddingRequest
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for EmbeddingRequest
impl RefUnwindSafe for EmbeddingRequest
impl Send for EmbeddingRequest
impl Sync for EmbeddingRequest
impl Unpin for EmbeddingRequest
impl UnsafeUnpin for EmbeddingRequest
impl UnwindSafe for EmbeddingRequest
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