Repository navigation
feat: channel commands, voice context, and a greeting that waits for session.started - #38
Merged
Merged
Conversation
…aits for session.started - Rename conversation actions to channel commands (Conversation.Actions -> Conversation.Commands). ToolCallScope.Conversation.Request -> ToolCallScope.Channel.Send; ConversationSession.Request -> Send. - Replace ICallTransfer with IChannelCommandHandler<TransferCommand, CallTransferOutcome>. - Add AddVoiceContextCommand: a silent fact for GPT-Live, sent as session.thinking.append. - Attach the GPT-Live channel before CallStarted, so a hook can send a command from it. - Send the greeting as commentary, and only after session.started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Conversation.Commands.ToolCallScope.Conversation.Request(...)is nowToolCallScope.Channel.Send(...).ConversationSession.Request(...)is nowSend(...).EndConversationAction→EndCommand,TransferAction→TransferCommand,ConversationActionResult→ChannelCommandResult.ICallTransferis gone. A host registersIChannelCommandHandler<TransferCommand, CallTransferOutcome>as a singleton instead.CallTransferis nowChannelCommandContext.AddVoiceContextCommandgives GPT-Live a fact it should know but not say. It goes out assession.thinking.appendwith no delegation (OpenAI's live guide). The text is cut to 1,000 characters.CallStarted. A hook can now send a command fromOnCallStartedAsync.session.started, as OpenAI's guide says.Public API
This breaks the API that v0.13.0 shipped: the
Conversation.Actionstypes are removed and replaced byConversation.Commands.Tests
ChannelCommandsTestsreplacesConversationActionsTests.OpenAiLiveVoiceContextTestscovers a fact sent mid-call, a fact sent beforesession.started, and a fact a hook sends fromCallStarted.TheGreetingWaitsForTheSessionToStartcovers the greeting gate.