Repository navigation
feat: voice.plan builtin and SetVoicePlanCommand for GPT-Live - #40
Merged
Merged
Conversation
- Add SetVoicePlanCommand: the plan a GPT-Live voice runs between the backend's answers.
Each plan replaces the one before it. Limit is 1,000 characters.
- Add the opt-in voice.plan builtin. It sends the plan through the turn's channel.
On a channel with no separate voice, it answers with a tool error.
- LiveChannel numbers each plan ("Plan N. This replaces every earlier plan.") and
sends context and plans one at a time, in order.
- Builtins bind a required text input the model left out as null, so the tool answers
with its own tool error instead of a throw.
The test waited for the greeting, which does not wait for the plan line. Plan 3 could still be in line when the test read the sent list.
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
SetVoicePlanCommandsets the plan a GPT-Live voice runs between the backend's answers: the next step, what to ask, and when to delegate again. A new plan replaces the last one. The limit is 1,000 characters.voice.planbuiltin. Opt-in. Declare it as{ id: plan, kind: builtin, uses: voice.plan }. The model calls it to send a plan through the turn's channel. On a channel with no separate voice, it returns a tool error.LiveChannelsends each plan as silent context, numbered: "Plan N. This replaces every earlier plan." GPT-Live cannot delete an append, so the number is what makes a newer plan win. Context and plans now go out one at a time, in the order they were sent.nulland returns its own tool error. Before, the call threw.Public API
Additive only:
SetVoicePlanCommand(withMaxLength = 1000).BuiltinToolNames.VoicePlan = "voice.plan".Tests
SetVoicePlanCommandTestsandVoicePlanToolDefinitionTestscover the command and the builtin.OpenAiLiveVoicePlanTestscovers numbering and send order on the GPT-Live channel.FilePublishToolDefinitionTestscovers the missing-input tool error.