Skip to content

Commit

Permalink
fix: agent keyterms should use list for parity with rest of sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
naomi-lgbt committed Feb 6, 2025
1 parent 26ec307 commit 80bd4cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Deepgram/Models/Agent/v2/WebSocket/Listen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record Listen

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("keyterms")]
public string[] Keyterms { get; set; }
public List<string>? Keyterms { get; set; }

/// <summary>
/// Override ToString method to serialize the object
Expand Down
3 changes: 2 additions & 1 deletion examples/agent/websocket/simple/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Deepgram.Microphone;
using Deepgram.Models.Authenticate.v1;
using Deepgram.Models.Agent.v2.WebSocket;
using System.Collections.Generic;

namespace SampleApp
{
Expand Down Expand Up @@ -195,7 +196,7 @@ await agentClient.Subscribe(new EventHandler<ErrorResponse>((sender, e) =>
settingsConfiguration.Context.Messages = new List<object> {};
settingsConfiguration.Context.Replay = false;
settingsConfiguration.Agent.Listen.Model = "nova-3";
settingsConfiguration.Agent.Listen.Keyterms = new string[] { "Deepgram" };
settingsConfiguration.Agent.Listen.Keyterms = new List<string> { "Deepgram" };

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

0 comments on commit 80bd4cd

Please sign in to comment.