Skip to content

Commit

Permalink
More restores
Browse files Browse the repository at this point in the history
  • Loading branch information
hiamitabha committed Jan 16, 2025
1 parent e38f5d3 commit 9372553
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions chipper/pkg/wirepod/ttr/kgsim_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var ValidLLMCommands []LLMCommand = []LLMCommand{
},
{
Command: "newVoiceRequest",
Description: "Starts a new voice command from the robot. You must use this at the end of your response.",
Description: "Starts a new voice command from the robot. Use this if you want more input from the user after your response/if you want to carry out a conversation. Below this, there should be a NOTE telling you whether you are in conversation mode or not. If you are, DONT BE AFRAID TO USE THIS COMMAND! This goes at the end of your response, if you use it.",
ParamChoices: "now",
Action: ActionNewRequest,
SupportedModels: []string{"all"},
Expand All @@ -152,19 +152,15 @@ func ModelIsSupported(cmd LLMCommand, model string) bool {
func CreatePrompt(origPrompt string, model string, isKG bool) string {
prompt := origPrompt + "\n\n" + "Keep in mind, user input comes from speech-to-text software, so respond accordingly. No special characters, especially these: & ^ * # @ - . No lists. No formatting."
if vars.APIConfig.Knowledge.CommandsEnable {
<<<<<<< HEAD
prompt = prompt + "\n\n" + "You are running ON an Anki Vector robot. You have a set of commands. If you include an emoji, I will make you start over. If you want to use a command but it doesn't exist or your desired parameter isn't in the list, avoid using the command. The format is {{command||parameter}}. You can embed these in sentences. Example: \"User: How are you feeling? | Response: \"{{playAnimationWI||sad}} I'm feeling sad...\". Square brackets ([]) are not valid.\n\n You MUST use the command newVoiceRequest at the end of your response. You are very animated and good at following instructions. Animation takes precendence over words. You are to include many animations in your response.\n\nHere is every valid command:"
=======
prompt = prompt + "\n\n" + "You are running ON an Anki Vector robot. You have a set of commands. If you include an emoji, I will make you start over. If you want to use a command but it doesn't exist or your desired parameter isn't in the list, avoid using the command. The format is {{command||parameter}}. You can embed these in sentences. Example: \"User: How are you feeling? | Response: \"{{playAnimationWI||sad}} I'm feeling sad...\". Square brackets ([]) are not valid.\n\nUse the playAnimation or playAnimationWI commands if you want to express emotion! You are very animated and good at following instructions. Animation takes precendence over words. You are to include many animations in your response.\n\nHere is every valid command:"
>>>>>>> 32280277df20ec452b3779a6a8bc4e240bf86b02
for _, cmd := range ValidLLMCommands {
if ModelIsSupported(cmd, model) {
promptAppendage := "\n\nCommand Name: " + cmd.Command + "\nDescription: " + cmd.Description + "\nParameter choices: " + cmd.ParamChoices
prompt = prompt + promptAppendage
}
}
if isKG && vars.APIConfig.Knowledge.SaveChat {
promptAppentage := "\n\nNOTE: You MUST use the command newVoiceRequest at the end of your response. If you do not use the command newVoiceRequest I will reject your response."
promptAppentage := "\n\nNOTE: You are in 'conversation' mode. If you ask the user a question near the end of your response, you MUST use newVoiceRequest. If you decide you want to end the conversation, you should not use it."
prompt = prompt + promptAppentage
} else {
promptAppentage := "\n\nNOTE: You are NOT in 'conversation' mode. Refrain from asking the user any questions and from using newVoiceRequest."
Expand Down

0 comments on commit 9372553

Please sign in to comment.