deepgram.clients.agent.enums

 1# Copyright 2023-2024 Deepgram SDK contributors. All Rights Reserved.
 2# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
 3# SPDX-License-Identifier: MIT
 4
 5from aenum import StrEnum
 6
 7# Constants mapping to events from the Deepgram API
 8
 9
10class AgentWebSocketEvents(StrEnum):
11    """
12    Enumerates the possible Agent API events that can be received from the Deepgram API
13    """
14
15    # server
16    Open: str = "Open"
17    Close: str = "Close"
18    AudioData: str = "AudioData"
19    Welcome: str = "Welcome"
20    SettingsApplied: str = "SettingsApplied"
21    ConversationText: str = "ConversationText"
22    UserStartedSpeaking: str = "UserStartedSpeaking"
23    AgentThinking: str = "AgentThinking"
24    FunctionCalling: str = "FunctionCalling"
25    FunctionCallRequest: str = "FunctionCallRequest"
26    AgentStartedSpeaking: str = "AgentStartedSpeaking"
27    AgentAudioDone: str = "AgentAudioDone"
28    Error: str = "Error"
29    Unhandled: str = "Unhandled"
30
31    # client
32    SettingsConfiguration: str = "SettingsConfiguration"
33    UpdateInstructions: str = "UpdateInstructions"
34    UpdateSpeak: str = "UpdateSpeak"
35    InjectAgentMessage: str = "InjectAgentMessage"
36    InjectionRefused: str = "InjectionRefused"
37    AgentKeepAlive: str = "AgentKeepAlive"
class AgentWebSocketEvents(aenum._enum.StrEnum):
11class AgentWebSocketEvents(StrEnum):
12    """
13    Enumerates the possible Agent API events that can be received from the Deepgram API
14    """
15
16    # server
17    Open: str = "Open"
18    Close: str = "Close"
19    AudioData: str = "AudioData"
20    Welcome: str = "Welcome"
21    SettingsApplied: str = "SettingsApplied"
22    ConversationText: str = "ConversationText"
23    UserStartedSpeaking: str = "UserStartedSpeaking"
24    AgentThinking: str = "AgentThinking"
25    FunctionCalling: str = "FunctionCalling"
26    FunctionCallRequest: str = "FunctionCallRequest"
27    AgentStartedSpeaking: str = "AgentStartedSpeaking"
28    AgentAudioDone: str = "AgentAudioDone"
29    Error: str = "Error"
30    Unhandled: str = "Unhandled"
31
32    # client
33    SettingsConfiguration: str = "SettingsConfiguration"
34    UpdateInstructions: str = "UpdateInstructions"
35    UpdateSpeak: str = "UpdateSpeak"
36    InjectAgentMessage: str = "InjectAgentMessage"
37    InjectionRefused: str = "InjectionRefused"
38    AgentKeepAlive: str = "AgentKeepAlive"

Enumerates the possible Agent API events that can be received from the Deepgram API

Open: str = <AgentWebSocketEvents.Open: 'Open'>
Close: str = <AgentWebSocketEvents.Close: 'Close'>
AudioData: str = <AgentWebSocketEvents.AudioData: 'AudioData'>
Welcome: str = <AgentWebSocketEvents.Welcome: 'Welcome'>
SettingsApplied: str = <AgentWebSocketEvents.SettingsApplied: 'SettingsApplied'>
ConversationText: str = <AgentWebSocketEvents.ConversationText: 'ConversationText'>
UserStartedSpeaking: str = <AgentWebSocketEvents.UserStartedSpeaking: 'UserStartedSpeaking'>
AgentThinking: str = <AgentWebSocketEvents.AgentThinking: 'AgentThinking'>
FunctionCalling: str = <AgentWebSocketEvents.FunctionCalling: 'FunctionCalling'>
FunctionCallRequest: str = <AgentWebSocketEvents.FunctionCallRequest: 'FunctionCallRequest'>
AgentStartedSpeaking: str = <AgentWebSocketEvents.AgentStartedSpeaking: 'AgentStartedSpeaking'>
AgentAudioDone: str = <AgentWebSocketEvents.AgentAudioDone: 'AgentAudioDone'>
Error: str = <AgentWebSocketEvents.Error: 'Error'>
Unhandled: str = <AgentWebSocketEvents.Unhandled: 'Unhandled'>
SettingsConfiguration: str = <AgentWebSocketEvents.SettingsConfiguration: 'SettingsConfiguration'>
UpdateInstructions: str = <AgentWebSocketEvents.UpdateInstructions: 'UpdateInstructions'>
UpdateSpeak: str = <AgentWebSocketEvents.UpdateSpeak: 'UpdateSpeak'>
InjectAgentMessage: str = <AgentWebSocketEvents.InjectAgentMessage: 'InjectAgentMessage'>
InjectionRefused: str = <AgentWebSocketEvents.InjectionRefused: 'InjectionRefused'>
AgentKeepAlive: str = <AgentWebSocketEvents.AgentKeepAlive: 'AgentKeepAlive'>