Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions deepgram/clients/agent/v1/websocket/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ def __getitem__(self, key):
if "voice" in _dict and isinstance(_dict["voice"], dict):
_dict["voice"] = CartesiaVoice.from_dict(_dict["voice"])
return _dict[key]


@dataclass
class Think(BaseResponse):
"""
Expand Down Expand Up @@ -284,6 +282,7 @@ class Agent(BaseResponse):
This class defines any configuration settings for the Agent model.
"""

language: str = field(default="en")
listen: Listen = field(default_factory=Listen)
think: Think = field(default_factory=Think)
speak: Speak = field(default_factory=Speak)
Expand All @@ -300,8 +299,6 @@ def __getitem__(self, key):
if "speak" in _dict and isinstance(_dict["speak"], dict):
_dict["speak"] = Speak.from_dict(_dict["speak"])
return _dict[key]


@dataclass
class Input(BaseResponse):
"""
Expand Down Expand Up @@ -343,16 +340,6 @@ def __getitem__(self, key):
_dict["output"] = Output.from_dict(_dict["output"])
return _dict[key]


@dataclass
class Language(BaseResponse):
"""
Define the language for the agent.
"""

type: str = field(default="en")


@dataclass
class SettingsOptions(BaseResponse):
"""
Expand All @@ -370,7 +357,6 @@ def __getitem__(self, key):
_dict["audio"] = Audio.from_dict(_dict["audio"])
if "agent" in _dict and isinstance(_dict["agent"], dict):
_dict["agent"] = Agent.from_dict(_dict["agent"])
return _dict[key]

def check(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/agent/async_simple/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async def on_unhandled(self, unhandled, **kwargs):
options.agent.listen.provider.keyterms = ["hello", "goodbye"]
options.agent.listen.provider.model = "nova-3"
options.agent.listen.provider.type = "deepgram"
options.language = "en"
options.agent.language = "en"


print("\n\nPress Enter to stop...\n\n")
Expand Down
4 changes: 2 additions & 2 deletions examples/agent/no_mic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def main():
# Agent configuration
options.agent.language = "en"
options.agent.listen.provider.type = "deepgram"
options.agent.listen.model = "nova-3"
options.agent.listen.provider.model = "nova-3"
options.agent.think.provider.type = "open_ai"
options.agent.think.model = "gpt-4o-mini"
options.agent.think.provider.model = "gpt-4o-mini"
options.agent.think.prompt = "You are a friendly AI assistant."
options.agent.speak.provider.type = "deepgram"
options.agent.speak.model = "aura-2-thalia-en"
Expand Down
2 changes: 1 addition & 1 deletion examples/agent/simple/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def on_unhandled(self, unhandled, **kwargs):
options.agent.listen.provider.keyterms = ["hello", "goodbye"]
options.agent.listen.provider.model = "nova-3"
options.agent.listen.provider.type = "deepgram"
options.language = "en"
options.agent.language = "en"
if dg_connection.start(options) is False:
print("Failed to start connection")
return
Expand Down