/*
 * OMF Embeddings
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

/// Embedding : Represents an embedding vector returned by embedding endpoint.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Embedding {
    /// The index of the embedding in the list of embeddings.
    #[serde(rename = "index")]
    pub index: i32,
    /// The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).
    #[serde(rename = "embedding")]
    pub embedding: Vec<f64>,
    /// The object type, which is always \"embedding\"
    #[serde(rename = "object")]
    pub object: Object,
}

impl Embedding {
    /// Represents an embedding vector returned by embedding endpoint.
    pub fn new(index: i32, embedding: Vec<f64>, object: Object) -> Embedding {
        Embedding {
            index,
            embedding,
            object,
        }
    }
}
/// The object type, which is always \"embedding\"
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Object {
    #[serde(rename = "embedding")]
    Embedding,
}

impl Default for Object {
    fn default() -> Object {
        Self::Embedding
    }
}
