vapi_client/models/
update_custom_knowledge_base_dto.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 UpdateCustomKnowledgeBaseDto {
16    /// This is where the knowledge base request will be sent.  Request Example:  POST https://{server.url} Content-Type: application/json  {   \"messsage\": {     \"type\": \"knowledge-base-request\",     \"messages\": [       {         \"role\": \"user\",         \"content\": \"Why is ocean blue?\"       }     ],     ...other metadata about the call...   } }  Response Expected: ``` {   \"message\": {      \"role\": \"assistant\",      \"content\": \"The ocean is blue because water absorbs everything but blue.\",   }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK   \"documents\": [     {       \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",       \"similarity\": 1     },     {       \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",       \"similarity\": .5     }   ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL } ```
17    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
18    pub server: Option<models::Server>,
19}
20
21impl UpdateCustomKnowledgeBaseDto {
22    pub fn new() -> UpdateCustomKnowledgeBaseDto {
23        UpdateCustomKnowledgeBaseDto { server: None }
24    }
25}