vapi_client/models/
trieve_knowledge_base_chunk_plan.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TrieveKnowledgeBaseChunkPlan {
16    /// These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.
17    #[serde(rename = "fileIds", skip_serializing_if = "Option::is_none")]
18    pub file_ids: Option<Vec<String>>,
19    /// These are the websites that will be used to create the vector store.
20    #[serde(rename = "websites", skip_serializing_if = "Option::is_none")]
21    pub websites: Option<Vec<String>>,
22    /// This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number.
23    #[serde(
24        rename = "targetSplitsPerChunk",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub target_splits_per_chunk: Option<f64>,
28    /// This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.
29    #[serde(rename = "splitDelimiters", skip_serializing_if = "Option::is_none")]
30    pub split_delimiters: Option<Vec<String>>,
31    /// This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each.
32    #[serde(rename = "rebalanceChunks", skip_serializing_if = "Option::is_none")]
33    pub rebalance_chunks: Option<bool>,
34}
35
36impl TrieveKnowledgeBaseChunkPlan {
37    pub fn new() -> TrieveKnowledgeBaseChunkPlan {
38        TrieveKnowledgeBaseChunkPlan {
39            file_ids: None,
40            websites: None,
41            target_splits_per_chunk: None,
42            split_delimiters: None,
43            rebalance_chunks: None,
44        }
45    }
46}