Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added interrupt option to Conversation and useConversation #18

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aleksailosey
Copy link

This is useful for a "click to interrupt" feature

@imaxisXD
Copy link

Plus one this is a much needed thing in the sdk

@AngeloGiacco
Copy link
Contributor

lgtm but can you give send off as well @aarthificial

@@ -438,6 +438,10 @@ export class Conversation {
this.lastFeedbackEventId = this.currentEventId;
this.updateCanSendFeedback();
};

public interrupt = () => {
return this.fadeOutAudio()
Copy link
Contributor

Choose a reason for hiding this comment

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

We should set the lastInterruptionTimestamp to the currentEventId to prevent future audio chunks streamed for the current agent response from canceling the fadeout

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.

4 participants