trieve-client 0.11.7

Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
Documentation
/*
 * Trieve API
 *
 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
 *
 * The version of the OpenAPI document: 0.11.7
 * Contact: developers@trieve.ai
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

/// DatasetConfigurationDto : Lets you specify the configuration for a dataset
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DatasetConfigurationDto {
    /// The average length of the chunks in the index for BM25
    #[serde(rename = "BM25_AVG_LEN", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bm25_avg_len: Option<Option<f32>>,
    /// The BM25 B parameter
    #[serde(rename = "BM25_B", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bm25_b: Option<Option<f32>>,
    /// Whether to use BM25
    #[serde(rename = "BM25_ENABLED", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bm25_enabled: Option<Option<bool>>,
    /// The BM25 K parameter
    #[serde(rename = "BM25_K", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bm25_k: Option<Option<f32>>,
    #[serde(rename = "DISTANCE_METRIC", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub distance_metric: Option<Option<models::DistanceMetric>>,
    /// The base URL for the embedding API
    #[serde(rename = "EMBEDDING_BASE_URL", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub embedding_base_url: Option<Option<String>>,
    /// The name of the embedding model to use
    #[serde(rename = "EMBEDDING_MODEL_NAME", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub embedding_model_name: Option<Option<String>>,
    /// The prefix to use for the embedding query
    #[serde(rename = "EMBEDDING_QUERY_PREFIX", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub embedding_query_prefix: Option<Option<String>>,
    /// The size of the embeddings
    #[serde(rename = "EMBEDDING_SIZE", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub embedding_size: Option<Option<i32>>,
    /// The frequency penalty to use
    #[serde(rename = "FREQUENCY_PENALTY", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub frequency_penalty: Option<Option<f64>>,
    /// Whether to use fulltext search
    #[serde(rename = "FULLTEXT_ENABLED", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub fulltext_enabled: Option<Option<bool>>,
    /// Whether to only use indexed chunks
    #[serde(rename = "INDEXED_ONLY", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub indexed_only: Option<Option<bool>>,
    /// The base URL for the LLM API
    #[serde(rename = "LLM_BASE_URL", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub llm_base_url: Option<Option<String>>,
    /// The default model to use for the LLM
    #[serde(rename = "LLM_DEFAULT_MODEL", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub llm_default_model: Option<Option<String>>,
    /// Whether the dataset is locked to prevent changes or deletion
    #[serde(rename = "LOCKED", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub locked: Option<Option<bool>>,
    /// The maximum limit for the number of chunks for counting
    #[serde(rename = "MAX_LIMIT", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub max_limit: Option<Option<i64>>,
    /// The maximum number of tokens to use in LLM Response
    #[serde(rename = "MAX_TOKENS", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub max_tokens: Option<Option<i64>>,
    /// The prompt to use for converting a message to a query
    #[serde(rename = "MESSAGE_TO_QUERY_PROMPT", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub message_to_query_prompt: Option<Option<String>>,
    /// The number of retrievals to include with the RAG model
    #[serde(rename = "N_RETRIEVALS_TO_INCLUDE", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub n_retrievals_to_include: Option<Option<i32>>,
    /// The presence penalty to use
    #[serde(rename = "PRESENCE_PENALTY", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub presence_penalty: Option<Option<f64>>,
    /// The prompt to use for the RAG model
    #[serde(rename = "RAG_PROMPT", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub rag_prompt: Option<Option<String>>,
    /// The base URL for the reranker API
    #[serde(rename = "RERANKER_BASE_URL", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub reranker_base_url: Option<Option<String>>,
    /// Whether to use semantic search
    #[serde(rename = "SEMANTIC_ENABLED", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub semantic_enabled: Option<Option<bool>>,
    /// The stop tokens to use
    #[serde(rename = "STOP_TOKENS", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub stop_tokens: Option<Option<Vec<String>>>,
    /// The system prompt to use for the LLM
    #[serde(rename = "SYSTEM_PROMPT", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub system_prompt: Option<Option<String>>,
    /// The temperature to use
    #[serde(rename = "TEMPERATURE", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub temperature: Option<Option<f64>>,
    /// Whether to use the message to query prompt
    #[serde(rename = "USE_MESSAGE_TO_QUERY_PROMPT", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub use_message_to_query_prompt: Option<Option<bool>>,
}

impl DatasetConfigurationDto {
    /// Lets you specify the configuration for a dataset
    pub fn new() -> DatasetConfigurationDto {
        DatasetConfigurationDto {
            bm25_avg_len: None,
            bm25_b: None,
            bm25_enabled: None,
            bm25_k: None,
            distance_metric: None,
            embedding_base_url: None,
            embedding_model_name: None,
            embedding_query_prefix: None,
            embedding_size: None,
            frequency_penalty: None,
            fulltext_enabled: None,
            indexed_only: None,
            llm_base_url: None,
            llm_default_model: None,
            locked: None,
            max_limit: None,
            max_tokens: None,
            message_to_query_prompt: None,
            n_retrievals_to_include: None,
            presence_penalty: None,
            rag_prompt: None,
            reranker_base_url: None,
            semantic_enabled: None,
            stop_tokens: None,
            system_prompt: None,
            temperature: None,
            use_message_to_query_prompt: None,
        }
    }
}