pub struct Embedding {
pub model: Model,
pub input: String,
pub user: Option<String>,
}
Expand description
Given a prompt and an instruction, the model will return an edited version of the prompt.
Fields§
§model: Model
§input: String
§user: Option<String>
Implementations§
Source§impl Embedding
impl Embedding
Sourcepub fn model(self, model: Model) -> Self
pub fn model(self, model: Model) -> 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(self, content: &str) -> Self
pub fn input(self, content: &str) -> 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(self, user: &str) -> Self
pub fn user(self, user: &str) -> Self
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Embedding
impl<'de> Deserialize<'de> for Embedding
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 Embedding
impl RefUnwindSafe for Embedding
impl Send for Embedding
impl Sync for Embedding
impl Unpin for Embedding
impl UnwindSafe for Embedding
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