Deepgram.Types.Agent (Deepgram v0.1.0)

View Source

Types for the Agent (AI Voice Agent) service.

Summary

Types

agent_audio_done_response()

@type agent_audio_done_response() :: %{type: String.t(), timestamp: String.t()}

agent_config()

@type agent_config() :: %{
  listen: listen_config(),
  think: think_config(),
  speak: speak_config()
}

agent_started_speaking_response()

@type agent_started_speaking_response() :: %{type: String.t(), timestamp: String.t()}

agent_thinking_response()

@type agent_thinking_response() :: %{type: String.t(), thinking: boolean()}

close_response()

@type close_response() :: %{type: String.t()}

conversation_text_response()

@type conversation_text_response() :: %{
  type: String.t(),
  text: String.t(),
  role: String.t()
}

error_response()

@type error_response() :: %{type: String.t(), error: String.t(), message: String.t()}

function_call_request()

@type function_call_request() :: %{
  type: String.t(),
  function_call: %{name: String.t(), arguments: String.t()}
}

function_call_response()

@type function_call_response() :: %{
  type: String.t(),
  function_call_id: String.t(),
  result: any()
}

function_def()

@type function_def() :: %{
  name: String.t(),
  description: String.t(),
  parameters: map(),
  required: [String.t()]
}

inject_message_options()

@type inject_message_options() :: %{
  type: String.t(),
  content: String.t(),
  role: String.t()
}

injection_refused_response()

@type injection_refused_response() :: %{type: String.t(), reason: String.t()}

listen_config()

@type listen_config() :: %{
  model: String.t(),
  language: String.t(),
  smart_format: boolean(),
  encoding: String.t(),
  channels: integer(),
  sample_rate: integer(),
  interim_results: boolean(),
  punctuate: boolean(),
  profanity_filter: boolean(),
  redact: [String.t()],
  endpointing: boolean(),
  utterance_end_ms: integer(),
  vad_turnoff: integer(),
  provider: provider()
}

open_response()

@type open_response() :: %{type: String.t()}

provider()

@type provider() :: %{type: String.t(), model: String.t()}

settings_applied_response()

@type settings_applied_response() :: %{type: String.t(), settings: map()}

settings_options()

@type settings_options() :: %{
  agent: agent_config(),
  version: String.t(),
  format: String.t(),
  encoding: String.t(),
  sample_rate: integer(),
  channels: integer(),
  language: String.t(),
  greeting: String.t()
}

speak_config()

@type speak_config() :: %{
  model: String.t(),
  encoding: String.t(),
  container: String.t(),
  sample_rate: integer(),
  provider: provider()
}

think_config()

@type think_config() :: %{
  provider: provider(),
  model: String.t(),
  instructions: String.t(),
  knowledge: String.t()
}

unhandled_response()

@type unhandled_response() :: %{type: String.t(), raw: String.t()}

user_started_speaking_response()

@type user_started_speaking_response() :: %{type: String.t(), timestamp: String.t()}

welcome_response()

@type welcome_response() :: %{type: String.t(), message: String.t()}