vapi_client/models/
tool_call_result_message_inner.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, Debug, PartialEq, Serialize, Deserialize)]
16#[serde(untagged)]
17pub enum ToolCallResultMessageInner {
18    ToolMessageComplete(models::ToolMessageComplete),
19    ToolMessageFailed(models::ToolMessageFailed),
20}
21
22impl Default for ToolCallResultMessageInner {
23    fn default() -> Self {
24        Self::ToolMessageComplete(Default::default())
25    }
26}
27/// This message is triggered when the tool call is complete.  This message is triggered immediately without waiting for your server to respond for async tool calls.  If this message is not provided, the model will be requested to respond.  If this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR.
28#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
29pub enum Type {
30    #[serde(rename = "request-complete")]
31    RequestComplete,
32    #[serde(rename = "request-failed")]
33    RequestFailed,
34}
35
36impl Default for Type {
37    fn default() -> Type {
38        Self::RequestComplete
39    }
40}
41/// This is optional and defaults to \"assistant\".  When role=assistant, `content` is said out loud.  When role=system, `content` is passed to the model in a system message. Example:     system: default one     assistant:     user:     assistant:     user:     assistant:     user:     assistant: tool called     tool: your server response     <--- system prompt as hint     ---> model generates response which is spoken This is useful when you want to provide a hint to the model about what to say next.
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum Role {
44    #[serde(rename = "assistant")]
45    Assistant,
46    #[serde(rename = "system")]
47    System,
48}
49
50impl Default for Role {
51    fn default() -> Role {
52        Self::Assistant
53    }
54}