pub struct CreateEmbeddingsRequest {
pub model: String,
pub input: Vec<String>,
pub user: Option<String>,
}
Fields§
§model: String
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.
input: Vec<String>
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.
user: Option<String>
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
Trait Implementations§
Source§impl Debug for CreateEmbeddingsRequest
impl Debug for CreateEmbeddingsRequest
Source§impl Default for CreateEmbeddingsRequest
impl Default for CreateEmbeddingsRequest
Source§fn default() -> CreateEmbeddingsRequest
fn default() -> CreateEmbeddingsRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateEmbeddingsRequest
impl<'de> Deserialize<'de> for CreateEmbeddingsRequest
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
Auto Trait Implementations§
impl Freeze for CreateEmbeddingsRequest
impl RefUnwindSafe for CreateEmbeddingsRequest
impl Send for CreateEmbeddingsRequest
impl Sync for CreateEmbeddingsRequest
impl Unpin for CreateEmbeddingsRequest
impl UnwindSafe for CreateEmbeddingsRequest
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