vapi_client/models/
knowledge_base_response_document.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 KnowledgeBaseResponseDocument {
16    /// This is the content of the document.
17    #[serde(rename = "content")]
18    pub content: String,
19    /// This is the similarity score of the document.
20    #[serde(rename = "similarity")]
21    pub similarity: f64,
22    /// This is the uuid of the document.
23    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
24    pub uuid: Option<String>,
25}
26
27impl KnowledgeBaseResponseDocument {
28    pub fn new(content: String, similarity: f64) -> KnowledgeBaseResponseDocument {
29        KnowledgeBaseResponseDocument {
30            content,
31            similarity,
32            uuid: None,
33        }
34    }
35}