pub struct EmbeddingsArguments {
pub model: String,
pub input: String,
pub user: Option<String>,
}
Expand description
Request arguments for embeddings.
See https://platform.openai.com/docs/api-reference/embeddings/create.
openai_rust::embeddings::EmbeddingsArguments::new(
"text-embedding-ada-002",
"The food was delicious and the waiter...".to_owned(),
);
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: String
Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed the max input tokens for the model (8191 tokens for text-embedding-ada-002
). Example Python code for counting tokens.
user: Option<String>
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Implementations§
Trait Implementations§
Source§impl Clone for EmbeddingsArguments
impl Clone for EmbeddingsArguments
Source§fn clone(&self) -> EmbeddingsArguments
fn clone(&self) -> EmbeddingsArguments
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 moreSource§impl Debug for EmbeddingsArguments
impl Debug for EmbeddingsArguments
Auto Trait Implementations§
impl Freeze for EmbeddingsArguments
impl RefUnwindSafe for EmbeddingsArguments
impl Send for EmbeddingsArguments
impl Sync for EmbeddingsArguments
impl Unpin for EmbeddingsArguments
impl UnwindSafe for EmbeddingsArguments
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