pub struct CreateEmbeddingsResponse {
pub object: String,
pub data: Vec<EmbeddingData>,
pub model: Model,
pub usage: Option<EmbeddingsUsage>,
}
Expand description
The response returned by the OpenAI Embeddings API.
Contains one or more embeddings (depending on whether multiple inputs were provided), along with the model used and usage metrics.
Fields§
§object: String
An identifier for this embedding request (e.g. “embedding-xxxxxx”).
data: Vec<EmbeddingData>
The list of embeddings returned, each containing an index and the embedding vector.
model: Model
The model used for creating these embeddings.
usage: Option<EmbeddingsUsage>
Optional usage statistics for this request.
Trait Implementations§
Source§impl Debug for CreateEmbeddingsResponse
impl Debug for CreateEmbeddingsResponse
Source§impl<'de> Deserialize<'de> for CreateEmbeddingsResponse
impl<'de> Deserialize<'de> for CreateEmbeddingsResponse
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 CreateEmbeddingsResponse
impl RefUnwindSafe for CreateEmbeddingsResponse
impl Send for CreateEmbeddingsResponse
impl Sync for CreateEmbeddingsResponse
impl Unpin for CreateEmbeddingsResponse
impl UnwindSafe for CreateEmbeddingsResponse
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