Skip to content

Commit

Permalink
fix: i think the example works now?
Browse files Browse the repository at this point in the history
  • Loading branch information
naomi-lgbt committed Jan 29, 2025
1 parent eb8c0a3 commit 4242619
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2,411 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ web.config
app.config
settings.json
project.lock.json

# Log
log.txt
2 changes: 1 addition & 1 deletion Deepgram/Models/Agent/v2/WebSocket/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Deepgram.Models.Agent.v2.WebSocket;

public record Content
public record Context
{
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("messages")]
Expand Down
2 changes: 1 addition & 1 deletion examples/agent/websocket/simple/Agent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
8 changes: 5 additions & 3 deletions examples/agent/websocket/simple/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,11 @@ await agentClient.Subscribe(new EventHandler<ErrorResponse>((sender, e) =>
var settingsConfiguration = new SettingsConfigurationSchema();
settingsConfiguration.Agent.Think.Provider.Type = "open_ai";
settingsConfiguration.Agent.Think.Model = "gpt-4o-mini";
settingsConfiguration.Agent.Think.Instructions = "You are a helpful AI assistant.";
settingsConfiguration.Audio.Output.SampleRate = 48000;
settingsConfiguration.Audio.Input.SampleRate = 16000;
settingsConfiguration.Audio.Output.SampleRate = 16000;
settingsConfiguration.Audio.Output.Container = "wav";
settingsConfiguration.Audio.Input.SampleRate = 44100;
settingsConfiguration.Context.Messages = new List<object> {};
settingsConfiguration.Context.Replay = false;

bool bConnected = await agentClient.Connect(settingsConfiguration);
if (!bConnected)
Expand Down
Loading

0 comments on commit 4242619

Please sign in to comment.