Vapi · Schema

AssistantMessage

AIVoiceAgentsRealtimeCPaaS

Properties

Name Type Description
role string This is the role of the message author
content string This is the content of the assistant message
refusal string This is the refusal message generated by the model
tool_calls array This is the tool calls generated by the model
name string This is an optional name for the participant
metadata object This is an optional metadata for the message
View JSON Schema on GitHub

JSON Schema

vapi-assistantmessage-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AssistantMessage",
  "title": "AssistantMessage",
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "description": "This is the role of the message author",
      "default": "assistant",
      "enum": [
        "assistant"
      ]
    },
    "content": {
      "type": "string",
      "description": "This is the content of the assistant message",
      "maxLength": 10000
    },
    "refusal": {
      "type": "string",
      "description": "This is the refusal message generated by the model",
      "maxLength": 10000
    },
    "tool_calls": {
      "description": "This is the tool calls generated by the model",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ToolCall"
      }
    },
    "name": {
      "type": "string",
      "description": "This is an optional name for the participant",
      "maxLength": 40
    },
    "metadata": {
      "type": "object",
      "description": "This is an optional metadata for the message"
    }
  },
  "required": [
    "role"
  ]
}