vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OpenAiResponsesRequest {
    /// This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead.
    #[serde(rename = "assistantId", skip_serializing_if = "Option::is_none")]
    pub assistant_id: Option<String>,
    /// This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead.
    #[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
    pub assistant: Option<models::CreateAssistantDto>,
    /// This is the name of the chat. This is just for your own reference.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// This is the ID of the session that will be used for the chat. Mutually exclusive with previousChatId.
    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    #[serde(rename = "input")]
    pub input: models::CreateChatDtoInput,
    /// Whether to stream the response or not.
    #[serde(rename = "stream", skip_serializing_if = "Option::is_none")]
    pub stream: Option<bool>,
    /// This is the ID of the chat that will be used as context for the new chat. The messages from the previous chat will be used as context. Mutually exclusive with sessionId.
    #[serde(rename = "previousChatId", skip_serializing_if = "Option::is_none")]
    pub previous_chat_id: Option<String>,
}

impl OpenAiResponsesRequest {
    pub fn new(input: models::CreateChatDtoInput) -> OpenAiResponsesRequest {
        OpenAiResponsesRequest {
            assistant_id: None,
            assistant: None,
            name: None,
            session_id: None,
            input,
            stream: None,
            previous_chat_id: None,
        }
    }
}