Struct async_openai::types::CreateEmbeddingRequestArgs
source · pub struct CreateEmbeddingRequestArgs { /* private fields */ }
Expand description
Builder for CreateEmbeddingRequest
.
Implementations§
source§impl CreateEmbeddingRequestArgs
impl CreateEmbeddingRequestArgs
sourcepub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
sourcepub fn input<VALUE: Into<EmbeddingInput>>(&mut self, value: VALUE) -> &mut Self
pub fn input<VALUE: Into<EmbeddingInput>>(&mut self, value: VALUE) -> &mut Self
Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 8192 tokens in length.
sourcepub fn user<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn user<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. Learn more.
sourcepub fn build(&self) -> Result<CreateEmbeddingRequest, OpenAIError>
pub fn build(&self) -> Result<CreateEmbeddingRequest, OpenAIError>
Trait Implementations§
source§impl Clone for CreateEmbeddingRequestArgs
impl Clone for CreateEmbeddingRequestArgs
source§fn clone(&self) -> CreateEmbeddingRequestArgs
fn clone(&self) -> CreateEmbeddingRequestArgs
Returns a copy 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 more