vapi_client/models/
knowledge_base_response_document.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct KnowledgeBaseResponseDocument {
17    /// This is the content of the document.
18    #[serde(rename = "content")]
19    pub content: String,
20    /// This is the similarity score of the document.
21    #[serde(rename = "similarity")]
22    pub similarity: f64,
23    /// This is the uuid of the document.
24    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
25    pub uuid: Option<String>,
26}
27
28impl KnowledgeBaseResponseDocument {
29    pub fn new(content: String, similarity: f64) -> KnowledgeBaseResponseDocument {
30        KnowledgeBaseResponseDocument {
31            content,
32            similarity,
33            uuid: None,
34        }
35    }
36}