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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18#[serde(untagged)]
19pub enum ToolCallResultMessageInner {
20 ToolMessageComplete(models::ToolMessageComplete),
21 ToolMessageFailed(models::ToolMessageFailed),
22}
23
24impl Default for ToolCallResultMessageInner {
25 fn default() -> Self {
26 Self::ToolMessageComplete(Default::default())
27 }
28}
29/// 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.
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
31pub enum Type {
32 #[serde(rename = "request-complete")]
33 RequestComplete,
34 #[serde(rename = "request-failed")]
35 RequestFailed,
36}
37
38impl Default for Type {
39 fn default() -> Type {
40 Self::RequestComplete
41 }
42}
43/// 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.
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
45pub enum Role {
46 #[serde(rename = "assistant")]
47 Assistant,
48 #[serde(rename = "system")]
49 System,
50}
51
52impl Default for Role {
53 fn default() -> Role {
54 Self::Assistant
55 }
56}