-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
https://platform.openai.com/docs/api-reference/embeddings/create
There is now an option for controlling the encoding format, and for the new v3 models, the dimensions of the vector. But the EmbeddingsBody doesn't have it
#[derive(Debug, Serialize, Deserialize)]
pub struct EmbeddingsBody {
/// 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.
pub model: 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.
pub input: Vec<String>,
/// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<String>,
}
Metadata
Metadata
Assignees
Labels
No labels