Skip to content

feat(deepgram): add updateOptions#374

Merged
Shubhrakanti merged 2 commits intomainfrom
nbsp/add/deepgram-updateoptions
Apr 28, 2025
Merged

feat(deepgram): add updateOptions#374
Shubhrakanti merged 2 commits intomainfrom
nbsp/add/deepgram-updateoptions

Conversation

@nbsp
Copy link
Contributor

@nbsp nbsp commented Apr 24, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Apr 24, 2025

🦋 Changeset detected

Latest commit: 5a48ee5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@livekit/agents-plugin-deepgram Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR


const listenTask = async () => {
while (!this.closed) {
while (!this.closed && !closing) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JC: was this causing an issue? If so - how did you notice it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wasn't causing an issue, i just added this so that when the old websocket closes the loop breaks as opposed to listening indefinitely to new outputs from a closed websocket

Copy link
Contributor

@Shubhrakanti Shubhrakanti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

};

await Promise.all([sendTask(), listenTask(), wsMonitor]);
await Promise.race([this.#resetWS.await, Promise.all([sendTask(), listenTask(), wsMonitor])]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we propagate exceptions from the underlying tasks? In python we have something like

for task in done:
          if task != wait_reconnect_task:
                  task.result()

@Shubhrakanti Shubhrakanti merged commit 77b69d1 into main Apr 28, 2025
8 checks passed
@Shubhrakanti Shubhrakanti deleted the nbsp/add/deepgram-updateoptions branch April 28, 2025 15:49
@github-actions github-actions bot mentioned this pull request Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants