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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct KnowledgeBaseResponseDocument {
19    /// This is the content of the document.
20    #[serde(rename = "content")]
21    pub content: String,
22    /// This is the similarity score of the document.
23    #[serde(rename = "similarity")]
24    pub similarity: f64,
25    /// This is the uuid of the document.
26    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
27    pub uuid: Option<String>,
28}
29
30impl KnowledgeBaseResponseDocument {
31    pub fn new(content: String, similarity: f64) -> KnowledgeBaseResponseDocument {
32        KnowledgeBaseResponseDocument {
33            content,
34            similarity,
35            uuid: None,
36        }
37    }
38}