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>,
}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
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 (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 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§fn rid(&self) -> Option<&str>
fn rid(&self) -> Option<&str>
Client-provided request id, when the protocol carries one. Routing may
derive a session-affinity key from it; a batch reports its first id.
Source§fn extract_text_for_routing(&self) -> String
fn extract_text_for_routing(&self) -> String
Extract text content for routing decisions
Source§fn routing_tokens(&self) -> Option<&[i32]>
fn routing_tokens(&self) -> Option<&[i32]>
Token IDs for routing when the request is already tokenized.
Some(_) routes on the token radix tree instead of the decimal-string
rendering of the same IDs.
Source§impl JsonSchema for EmbeddingRequest
impl JsonSchema for EmbeddingRequest
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 inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being 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