openai_struct/models/
create_embedding_response.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https:///platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https:///github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14/// # on openapi.yaml
15///
16/// ```yaml
17/// CreateEmbeddingResponse:
18///   type: object
19///   properties:
20///     data:
21///       type: array
22///       description: The list of embeddings generated by the model.
23///       items:
24///         $ref: "#/components/schemas/Embedding"
25///     model:
26///       type: string
27///       description: The name of the model used to generate the embedding.
28///     object:
29///       type: string
30///       description: The object type, which is always "list".
31///       enum:
32///         - list
33///       x-stainless-const: true
34///     usage:
35///       type: object
36///       description: The usage information for the request.
37///       properties:
38///         prompt_tokens:
39///           type: integer
40///           description: The number of tokens used by the prompt.
41///         total_tokens:
42///           type: integer
43///           description: The total number of tokens used by the request.
44///       required:
45///         - prompt_tokens
46///         - total_tokens
47///   required:
48///     - object
49///     - model
50///     - data
51///     - usage
52/// ```
53#[derive(Debug, Serialize, Deserialize)]
54pub struct CreateEmbeddingResponse {
55    /// The list of embeddings generated by the model.
56    #[serde(rename = "data")]
57    pub data: Vec<crate::models::Embedding>,
58    /// The name of the model used to generate the embedding.
59    #[serde(rename = "model")]
60    pub model: String,
61    /// The object type, which is always \"list\".
62    #[serde(rename = "object")]
63    pub object: String,
64    #[serde(rename = "usage")]
65    pub usage: crate::models::CreateEmbeddingResponseUsage,
66}