#[non_exhaustive]pub struct CreateEmbeddingRequest {
pub model: String,
pub input: EmbeddingInput,
pub encoding_format: Option<EmbeddingEncodingFormat>,
pub dimensions: Option<u32>,
pub user: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
EN: Request body for POST /v1/embeddings.
中文:POST /v1/embeddings 的请求体。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: StringEN: Model id used to create embeddings. 中文:用于创建 embeddings 的模型 ID。
input: EmbeddingInputEN: Input text or text array. 中文:输入文本或文本数组。
encoding_format: Option<EmbeddingEncodingFormat>EN: Optional embedding encoding format. 中文:可选的 embedding 编码格式。
dimensions: Option<u32>EN: Optional output vector dimension count for supported models. 中文:支持的模型可选输出向量维度数。
user: Option<String>EN: Optional end-user identifier. 中文:可选的终端用户标识。
extra: BTreeMap<String, Value>EN: Forward-compatible optional fields not yet covered by handwritten types. 中文:手写类型尚未覆盖的前向兼容可选字段。
Implementations§
Source§impl CreateEmbeddingRequest
impl CreateEmbeddingRequest
Sourcepub fn builder() -> CreateEmbeddingRequestBuilder
pub fn builder() -> CreateEmbeddingRequestBuilder
EN: Starts building an embeddings request. 中文:开始构建 embeddings 请求。
Trait Implementations§
Source§impl Clone for CreateEmbeddingRequest
impl Clone for CreateEmbeddingRequest
Source§fn clone(&self) -> CreateEmbeddingRequest
fn clone(&self) -> CreateEmbeddingRequest
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 CreateEmbeddingRequest
impl Debug for CreateEmbeddingRequest
Source§impl PartialEq for CreateEmbeddingRequest
impl PartialEq for CreateEmbeddingRequest
Source§fn eq(&self, other: &CreateEmbeddingRequest) -> bool
fn eq(&self, other: &CreateEmbeddingRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CreateEmbeddingRequest
impl Serialize for CreateEmbeddingRequest
impl StructuralPartialEq for CreateEmbeddingRequest
Auto Trait Implementations§
impl Freeze for CreateEmbeddingRequest
impl RefUnwindSafe for CreateEmbeddingRequest
impl Send for CreateEmbeddingRequest
impl Sync for CreateEmbeddingRequest
impl Unpin for CreateEmbeddingRequest
impl UnsafeUnpin for CreateEmbeddingRequest
impl UnwindSafe for CreateEmbeddingRequest
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