All VoiceAttack Variables - SemlerPDX/OpenAI-VoiceAttack-Plugin GitHub Wiki
This is a comprehensive list of all the VoiceAttack variables that are either used by the OpenAI Plugin or can be provided to the OpenAI Plugin as options for profile developers, along with their descriptions, rules, and relatives. These variables can be set as allowed by the specific variable or their values can be read to obtain information about the plugin operations in VoiceAttack. When any variable listed below is Not set in VoiceAttack, the default value shown for that entry will be used.
For many of these variables, and unless otherwise noted, the plugin never sets or clears the variable value and can only read it, which (for some of these variables below) means the plugin could read a variable value from a previous request if its value is not cleared manually by profile developers in their commands when done using it. It would be good practice to adopt a standard to clear (or Not set) all parameter variables appropriate to the given context of a plugin call in which they do not want it used. This can ensure that any value which may have persisted from another command or plugin call cannot be used in the new plugin call. If one command sets the OpenAI_MaxTokens integer variable, for example, another command which does not want to use it should start by clearing this variable (or setting it differently) without assuming it has no value to begin with.
A large majority of values from variables below relating to a plugin call are gathered at the top of the method for the context of a plugin call. This means that a continuing ChatGPT session, for example, will not care if the variables which were set to establish that Session such as OpenAI_MaxTokens are changed after it has begun, and will not read the values of those variables a second time during the same session. Key exceptions to this include the "Special" boolean state changed variables listed at the top of this page, along with variables used in the GetInput method of a ChatGPT context plugin call, including Pre-Listen and Pre-Process TTS variables and the Looping Pre-Process boolean, as well as optional variables for custom Listen and Dictation Stop commands (if set).
- Boolean 'State Changed' Variables (Special)
- Boolean Variables
- Decimal Variables
- Integer Variables
- Text Variables
- Text-to-Speech Variables (Special)
(each of these "special" boolean variable names must end with the # symbol!)
A Continuing ChatGPT Session is Active
default value: False
user can set value: False (only)
A global boolean variable to indicate that a continuing ChatGPT session is currently active. Setting this to False will end a continuing chat session. Profiles may set this False to control session ending, but only the plugin should ever set this to True.
OpenAI_Listening# is directly tied to this boolean variable value and will become False if this boolean is False.
OpenAI Plugin is Listening for Voice Input
default value: False
user can set value: False (only)
A global boolean variable to indicate that ChatGPT is currently listening for user input. When True, listening is on. Setting this to False will end listening in the GetInput loop, either ending chat, returning to get new input, or returning to a 'wait to continue' loop. Profiles may set this False to end the GetInput phase of a ChatGPT context plugin call, but only the plugin should ever set this to True.
OpenAI_Chatting# is directly tied to this boolean variable value and if it is set to False, this boolean will also be set to False.
ChatGPT Session is Waiting to Continue
default value: False
user can set value: False (only)
A global boolean variable to indicate that a continuing ChatGPT session is currently waiting until a profile sets this boolean to False. Setting this to False will continue a ChatGPT session to the GetInput phase, if OpenAI_UserInput has been set already, that will be used as the input. Profiles may set this False to control session flow, but only the plugin should ever set this to True.
OpenAI_ExternalContinue and OpenAI_ExternalContinue_Unstoppable are booleans related to this External Continue option.
OpenAI Plugin is Writing Debug Messages to Event Log
default value: False
user can set value: True or False
A global boolean variable for outputting debug and informational messages to the VoiceAttack Event Log. Setting this to True will enable extended VoiceAttack Event Log messages output by the OpenAI plugin, including full error details which typically only appear in the 'openai_errors.log', as well as reminders every 5 seconds if listening or waiting to continue, and a note anytime a plugin call has ended. Profiles may set this to True or False as desired.
| (variable types) | (table of contents) | (back to top) |
OpenAI Moderation Content Flagged
default value: False
user can set value: False (only)
A global boolean variable to indicate that OpenAI Moderation has flagged the supplied input as inappropriate following a return from a 'Moderation' context plugin call. Setting this to False will have no effect, and serves only to reset the flag as desired by profiles for variable or flow control in command systems using 'Moderation' plugin context. The plugin sets this boolean to False at the beginning of any Moderation context plugin call, it never reads it or clears it to Not set. Profiles may set this False to control session flow or merely reset, but only the plugin should ever set this to True.
OpenAI_TTS_ContentFlagged is a text-to-speech variable related to Moderation context plugin calls.
Disable VoiceAttack Global Listen Mode
default value: False
user can set value: True or False
A global boolean variable to indicate that the OpenAI plugin should return the Global Listening Mode in VoiceAttack to a 'not listening' state when a GetInput phase of the plugin is completed. If OpenAI_ListenTimeout_Seconds has been set, and is greater than 0, the Global Listening Mode will only be stopped once a timeout has been reached due to no new user input being detected. Setting this to True will allow the plugin respect users who only enable Listening by command or push-to-talk hotkeys. The plugin will not enable Listening, profiles must use their own commands or hotkeys to ensure Listening is enabled prior to a GetInput phase of a plugin call. Profiles may set this True or False as desired.
OpenAI Plugin Error Flag
default value: False
user can set value: False (read only)
A global boolean variable to indicate that an error has occurred in the most recent OpenAI plugin call (not neccessarily every concurrent plugin call). Setting this to False in profiles will have no effect, and serves only to reset the flag as desired by profiles for variable or flow control in command systems. The required OpenAI Speech command will only speak that an error has occurred if True when executed, and then reset this to False. Profiles may set this False to control session flow, such as before calling the Speech command to ensure it will execute, but only the plugin should ever set this to True. The plugin always sets this variable to False at the beginning of every plugin call regardless of the context.
See also OpenAI_Debugging# and OpenAI_Plugin_ErrorsLogPath
Write User Inputs and ChatGPT Replies to VoiceAttack Event Log
default value: True
user can set value: True or False
A global boolean variable to indicate that user input prompts and ChatGPT responses should be written to the VoiceAttack event log. Users may also customize the role pre-text which appears before the input and responses. Profiles may set this True or False as desired.
OpenAI_LogChat_InputPretext and OpenAI_LogChat_OutputPretext are text variable related to this Log Chat pre-text option.
Loop a Sound until OpenAI Responds
default value: False
user can set value: True or False (see notes)
A global boolean variable to indicate that the provided Pre-Process sound file should loop continuously until OpenAI responds following a GetInput phase. Setting this to True will have no effect unless the OpenAI_TTS_PreProcess text variable contains a valid file path to an existing sound file, rather than a phrase to speak at this stage (such as "One moment please."). When False, and supplied with a sound file path, the sound will only play one time. Profiles may set this True or False as desired, so long as a sound file path is also supplied when True.
OpenAI_TTS_PreProcess is the text variable required for this Looping Pre-Process sound option.
Wait to Continue a ChatGPT Session after Response
default value: False
user can set value: True or False
A global boolean variable to indicate that a continuing ChatGPT session should enter a waiting loop following a response until the profile sets the OpenAI_ChatWaiting# boolean to False. Setting this to False will continue a ChatGPT session to the GetInput phase immediately, and expect the user to speak their next input. If OpenAI_UserInput has been set already when the external continue command is complete, that will be used as the input in the subsequent GetInput phase. Profiles may set this True or False as desired to control chat session flow.
OpenAI_ListenTimeout_Seconds is an integer variable related to this External Continue option
OpenAI_ExternalContinue_Unstoppable and OpenAI_ExternalContinue_Exclusive are booleans related to this External Continue option.
Ignore Stop Button in VoiceAttack while Waiting
default value: False
user can set value: True or False
A global boolean variable to indicate that a continuing ChatGPT session which is currently waiting will respect or ignore the Stop Button or 'stop all commands' action in VoiceAttack. Setting this to True will continue a waiting loop only until OpenAI_ChatWaiting# becomes false, or VoiceAttack is closed. This is True by default in my own publicly distributed VoiceAttack profile using my OpenAI Plugin 'AVCS Voice ChatGPT Conversations', for example, to allow it to remain waiting in the background regardless of user activity throughout other VoiceAttack profiles or plugins. Profiles may set this to True or False as desired.
OpenAI_ExternalContinue is a boolean related to this External Continue option.
Exclusively Wait to Continue a ChatGPT Session after Response
default value: False
user can set value: True or False
A global boolean variable to indicate that a continuing ChatGPT session which is arriving at a waiting phase should enter the waiting phase regardless of any other rules, such as the lack of a GetInput timeout when a timeout value is set. When this is True, a ChatGPT session which can enter a waiting loop will enter it at every loop iteration. When False, default flow behavior is to always return to a GetInput phase when a timeout is set, and only if no input detected and a timeout was reached, will the ChatGPT session enter a waiting loop until OpenAI_ChatWaiting# becomes false, etc. Profiles may set this to True or False as desired, but it will have no effect unless OpenAI_ExternalContinue is also True, and will not neccessarily be required unless the integer variable OpenAI_ListenTimeout_Seconds has been set above 0.
OpenAI_ExternalContinue is a boolean required for this Exclusive External Continue option.
Execute an External Responder Command after ChatGPT Replies
default value: False
user can set value: True or False (see notes)
A global boolean variable to indicate that the OpenAI plugin should execute an external responder command directly after the (optional) speech command is executed (and completed) following a ChatGPT reply. Setting this to True will have no effect unless the OpenAI_Command_ExternalResponder text variable contains a valid command name of an existing command in the profile. When True, this external command will be executed and will wait until it is complete before returning to a Waiting or GetInput phase of a chat session (or a singular chat simply ending). Profiles may set this True or False as desired, so long as an existing external responder command is also supplied.
OpenAI_Command_ExternalResponder is a text variable related to this External Responder option.
OpenAI Plugin Initialization Flag
default value: False
user can set value: NO (read only)
A global boolean variable to indicate that the OpenAI Plugin for VoiceAttack has properly initialized when VoiceAttack was launched. If this is False, calls to the OpenAI Plugin will fail. Profiles should never set this variable, and should only read it as needed to check its value. Errors which prevent initialization will be displayed in the VoiceAttack Event Log.
Speak ChatGPT Responses using Text-to-Speech
default value: True
user can set value: True or False
A global boolean variable to indicate that VoiceAttack should speak the response from ChatGPT with text-to-speech using the required ((OpenAI Speech)) command in the VoiceAttack profile. Setting this to False will return the response in the OpenAI_TTS_Response and OpenAI_Response text variables only, for profiles to do with as they wish. Profiles may set this True or False as desired for any given chat command prior to a ChatGPT plugin call. Because any given call sets this at the beginning of a session (or single call) from the value contained in this boolean variable, changing this during an active ChatGPT session will not have an effect until that session is ended and a new session started with this set to True. It dictates the nature of an entire chat session, such as setting the OpenAI Model or max tokens before a continuing ChatGPT session plugin call.
OpenAI_Command_Speech and OpenAI_TTS_Response are text variables related to this Text to Speech option.
| (variable types) | (table of contents) | (back to top) |
Frequency Penalty
default value: 0.0
user can set value: -2.0 to 2.0
A global decimal variable provided to an individual OpenAI Chat or Completion request to define the Frequency Penalty value. This is the scale of the penalty for how often a token is used. Should generally be between 0 and 1, although negative numbers are allowed to encourage token reuse. Profiles may set this prior to a plugin call, or when Not set, default will be used.
Learn more about Frequency and Presence Penalty parameters here: https://platform.openai.com/docs/api-reference/parameter-details
Presence Penalty
default value: 0.0
user can set value: -2.0 to 2.0
A global decimal variable provided to an individual OpenAI Chat or Completion request to define the Presence Penalty value. This is the scale of the penalty applied if a token is already present at all. Should generally be between 0 and 1, although negative numbers are allowed to encourage token reuse. Profiles may set this prior to a plugin call, or when Not set, default will be used.
Learn more about Frequency and Presence Penalty parameters here: https://platform.openai.com/docs/api-reference/parameter-details
Sampling Temperature
default value: 0.1
user can set value: 0.0 to 2.0
A global decimal variable provided to an individual OpenAI Chat or Completion request to define what sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. It is generally recommend to use this or OpenAI_TopP but not both. Profiles may set this prior to a plugin call, or when Not set, default will be used.
Top_P Nucleus Sampling
default value: 0.0
user can set value: 0.0 - 1.0
A global decimal variable provided to an individual OpenAI Chat or Completion request as an alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. It is generally recommend to use this or OpenAI_Temperature but not both. Profiles may set this prior to a plugin call, or when Not set, default will be used.
| (variable types) | (table of contents) | (back to top) |
Initial Listening Timeout Seconds for GetInput
default value: 4
user can set value: 0 or higher
A global integer variable indicating the initial number of seconds before a GetInput phase of the plugin will stop listening for input when none has been detected. When Not set, or set to 0, the default timeout will be applied. If set above 0, this is the number of seconds GetInput will wait until giving up and either ending the plugin call, returning to get input again, or returning to a 'wait to continue' loop. Profiles may set this to 0 or higher as desired.
OpenAI_ExternalContinue_Exclusive is a boolean related to this custom GetInput timeout option.
OpenAI_ListenTimeout_Seconds is an integer related to this custom GetInput timeout option.
Listening Timeout Seconds for GetInput
default value: 2
user can set value: 0 or higher
A global integer variable indicating the number of seconds once speech has begun before a GetInput phase of the plugin will stop listening for input when none has been detected. When Not set, or set to 0, the default timeout will be applied. If set above 0, this is the number of seconds GetInput will wait until giving up and either ending the plugin call, returning to get input again, or returning to a 'wait to continue' loop. Profiles may set this to 0 or higher as desired.
OpenAI_ExternalContinue_Exclusive is a boolean related to this custom GetInput timeout option.
OpenAI_ListenTimeout_InitialSeconds is an integer related to this custom GetInput timeout option.
Number of Choices per Message
default value: 1
user can set value: 1 or higher
A global integer variable provided to an individual OpenAI Chat or Completion request to indicate the number of reply choices which should be returned in a response. A newline will separate each choice in the OpenAI_TTS_Response and OpenAI_Response text variables, and profiles will want to parse these before using a response, else text-to-speech would speak each (possibly quite similar) response back-to-back. To best use this option, profiles should set OpenAI_SpeakChat to False, and OpenAI_ExternalResponder to True - with an existing command set to the OpenAI_Command_ExternalResponder text variable which can properly deal with multiple choice responses as desired.
Max Tokens in Response
default value: 512
user can set value: (see Models MaxTokens)
A global integer variable provided to an individual OpenAI Chat or Completion request to indicate the number of tokens to generate in the response. The total length of input tokens and generated tokens is limited by the Model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096 - or higher in GPT-4, for those with beta API access to it). The token count of your input prompt plus 'OpenAI_MaxTokens' cannot exceed the indicated model's context length or the plugin call may throw an error, or return a response which is cut off. For a continuing chat session, try simply asking it to continue where it left off (providing the last sentence can help it better understand what you mean). For example, "Your last response cut off at 'and was built in 1849 by...', please continue from there."
Learn more about tokens here: https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them
| (variable types) | (table of contents) | (back to top) |
OpenAI API Access Key
default value: Not set
user can set value: (optionally)
A global text variable providing an alternate method for supplying the end user's private key of their OpenAI API account to the OpenAI Plugin for making requests to the API. This plugin already includes a bog-standard GUI menu for entering the API Key, which saves it to file at the default (or custom) key file path. Profile developers can use this variable to create their own GUI or systems for allowing users to set, change, or delete their key which must be set somewhere for the OpenAI plugin and profiles using it to function. The plugin never sets this OpenAI_API_Key to the value of the user's API Key, but when a valid key is contained in this text variable, this is the key that will be used instead of any key which may be on file (or not).
See also OpenAI_API_Org , OpenAI_API_Key_FileFolder and OpenAI_API_Key_FileName below.
Alternate API Key File Name
default value: "key.openai"
user can set value: (optionally)
A global text variable providing an optional method for indicating a non-standard custom file name for the file which contains the end user's private key to their OpenAI API account. Use this along with the folder path variable below to form an entirely custom path to the OpenAI API Key file for yourself or users of your profile if desired. The default means of obtaining the key for plugin calls is from file, and if the API key text variable above is set to a valid key, it will not be loaded from file (either from the default or custom location indicated in this variable). The plugin never sets this variable, it can only read it. The extension can be anything, and does not need to be '.openai' to function.
Default keyfile path is: %AppData%\OpenAI_VoiceAttack_Plugin\key.openai
Default keyfile format: OPENAI_API_KEY=sk-12345abcdefghijklmnopqrstuvwxyz
See also OpenAI_API_Key and OpenAI_API_Key_FileFolder
Alternate API Key File Folder Path
default value: "%AppData%\OpenAI_VoiceAttack_Plugin"
user can set value: (optionally)
A global text variable providing an optional method for indicating a non-standard custom folder path to the file which contains the end user's private key to their OpenAI API account. Use this along with the filename path variable below to form an entirely custom path to the OpenAI API Key file for yourself or users of your profile if desired. The default means of obtaining the key for plugin calls is from file, and if the API key text variable above is set to a valid key, it will not be loaded from file (either from the default or custom location indicated in this variable). The plugin never sets this variable, it can only read it.
See also OpenAI_API_Key and OpenAI_API_Key_FileName above.
Requesting Organization
default value: Not set
user can set value: (optionally)
A global text variable provided to any OpenAI API request to indicate the organization for this API call. For users who belong to multiple organizations, you can pass this value to specify which organization is used for an API request. Usage from these API requests will count against the specified organization's subscription quota. Profiles or end users may also add this to their keyfile as a new line above or below the OpenAI key. When the OpenAI_API_Key text variable is set to a valid key, an organization entry on file will not be read, and this text variable would need to be set in order to attach the desired organization to an API call. See format below - when read from file, the ":" (colon) and "=" (equals) characters are not allowed in the name. The plugin never sets this variable, it can only read it.
Default keyfile path is: %AppData%\OpenAI_VoiceAttack_Plugin\key.openai
Default keyfile format: OPENAI_ORGANIZATION=Organization Name
See also OpenAI_API_Key , OpenAI_API_Key_FileFolder and OpenAI_API_Key_FileName above.
Plugin Temporary Dictation Audio File Path
default value: "%AppData%\OpenAI_VoiceAttack_Plugin\whisper\{GUID}.wav"
user can set value: (see notes)
A global text variable set by the plugin to hold the path to the saved dictation audio file which will be processed using OpenAI Whisper. The plugin generates a unique file name for audio files it produces from dictation, and sets the path to this new file in this text variable. Typically, the plugin itself sets this variable, but Profiles can use this as a way to pass an audio file path for Whisper that can be cleared automatically when the plugin call ends. NOTE: All ".wav" audio files in the default \whisper\ folder above will be deleted when VoiceAttack launches with OpenAI Plugin, and after every plugin call ends. They can pile up during a chat 'session', but are relatively tiny sound files, and OpenAI Plugin will always clean up after itself. The plugin always clears this variable at the end of every plugin call regardless of the context.
Allowed file types: mp3, mp4, mpeg, mpga, m4a, wav, or webm
See also OpenAI_AudioPath below.
Profile Override Audio File Path
default value: Not set
user can set value: (on use, must clear after)
A global text variable for Profiles to set for providing the path to an audio file which will be processed using OpenAI Whisper. By default, this text variable will be read before OpenAI_AudioFile above as the target path for Whisper, and so must be Not set or empty in order for default plugin Whisper Audio Processing systems to work in the OpenAI VoiceAttack Plugin. This is an effective override for the default system used by the plugin, for those who would like to introduce their own system for audio file input for just one plugin call or throughout their profile systems. The plugin never sets this variable, it can only read it. In order to ensure proper respect for the functionality of outside profiles using this plugin, this text variable will never be cleared by the plugin and profiles are responsible for clearing it before any other plugin call which may use Whisper can act. NOTE: If you set this, clear it immediately after using it for your plugin call!
Allowed file types: mp3, mp4, mpeg, mpga, m4a, wav, or webm
See also OpenAI_AudioFile above.
External Start Listening Command Name
default value: "((OpenAI DictationStart))"
user can set value: (optionally)
A global text variable providing an optional command which will be called at the beginning of the GetInput phase in a ChatGPT plugin call. The value of this variable must be the 'When I say' phrase of an existing command in an active VoiceAttack Profile (or a locally/globally referenced Profile). Profiles using this command will bypass the entire plugin GetInput, allowing fully custom methods for both initiating Dictation or input capture and also subsequent ending of Dictation and storage of the input captured (in text or audio form). The plugin will wait until this external Listen command ends, and so profile developers may use this as an alternate or custom way to set the OpenAI_UserInput and OpenAI_AudioPath (or OpenAI_AudioFile) text variables containing the user input to be processed in the next phase of a ChatGPT plugin call. The OpenAI Plugin Sample Profile contains an example of what a command such as this can or should perform if taking over these actions which the plugin typically performs itself. The actual name of the command can be changed in a profile using OpenAI Plugin, but then this text variable must be changed to match that command phrase. Using this will also bypass the default or custom 'Dictation Stop' command even when set to the OpenAI_Command_DictationStop text variable.
See also OpenAI_Command_DictationStop
External Dictation Stop Command Name
default value: "((OpenAI DictationStop))"
user can set value: (optionally)
A global text variable providing an optional command which (if set) will be called when Dictation has ended, by whatever means a profile developer designs. This will override the plugin's default behavior handling the task of gathering and combining dictation audio files for Whisper. context calls. The value of this variable must be the 'When I say' phrase of an existing command in an active VoiceAttack Profile (or a locally/globally referenced Profile). Using this allow customization of the Stop command to be executed when a ChatGPT call exits the GetInput phase. A Dictation Stop command example is provided in the sample profile - when creating a command like this, it should contain the actions to save Captured Audio of the last Dictation to file, setting the OpenAI_AudioPath text variable to the path of that audio file if Whisper will be used in this call, and (optionally) clearing the Dictation buffer. If the OpenAI_TTS_PreProcess speach or audio file is Not set or empty, a profile could use a custom Dictation Stop command to provide their own feedback to users that Dictation has ended and the input will now be sent to an OpenAI API call (which will take a few seconds to return). This would also be the place to start and control your own sound or sound loop which plays until OpenAI_TTS_Response contains a response. Using this command with the the default or custom 'Dictation Stop' command name, even when set to the OpenAI_Command_DictationStop text variable, will have NO effect if also using the custom 'Dicatation Start' option above.
See also OpenAI_Command_DictationStart
External Responder Command Name
default value: "((OpenAI ExternalResponder))"
user can set value: (optionally)
A global text variable providing an optional command which will be called following a ChatGPT response. The value of this variable must be the 'When I say' phrase of an existing command in an active VoiceAttack Profile (or a locally/globally referenced Profile). Use this along with the OpenAI_ExternalResponder boolean variable to allow this command to be executed following the (also optional) logging and speaking phases after ChatGPT replies and before the chat ends, or before it loops back to a GetInput phase and/or a 'wait to continue' phase of a continuing chat session. The plugin will wait until this external responder command ends, and so profile developers may also use this as a means to provide alternate ways to present the values of OpenAI_TTS_Response or OpenAI_Response text variables containing the reply, or perhaps even to provide new input by setting the OpenAI_UserInput text variable before the ChatGPT session flow returns to a GetInput phase. The actual name of the command can be changed in a profile using OpenAI Plugin, but then this text variable must be changed to match that command phrase.
See also OpenAI_ExternalResponder
Default Sound Player Command Name
default value: "((OpenAI Sound))"
user can set value: (optionally)
A global text variable providing an optional method to rename the required command which allows the OpenAI Plugin for VoiceAttack to play sound effects. By default, the plugin expects any profile using it to have a command named ((OpenAI Sound)) - the checkbox next to the 'When I say' phrase should not be checked, though it will not matter if it is. This is a "function" command which is not called by a voice command, but by other commands or the plugin. First, the sound effect file must be set in the OpenAI_TTS_Response variable, which should be a valid path to an audio file. When the value of OpenAI_Loop_PreProcess is True, the sound effect will play in a loop. This variable should be set to the 'When I say' phrase of an existing command in an active VoiceAttack Profile (or a locally/globally referenced Profile). The plugin will call this command whenever a sound effect needs to be played, such as in response to a button click or another event.
See also OpenAI_TTS_PreProcess and OpenAI_Error
Default Text-to-Speech Command Name
default value: "((OpenAI Speech))"
user can set value: (optionally)
A global text variable providing an optional method to rename the required command which allows the OpenAI Plugin for VoiceAttack to speak using text-to-speech or play sound files. By default, the plugin expects any profile using it to have a command named ((OpenAI Speech)) - the checkbox next to the 'When I say' phrase should not be checked, though it will not matter if it is. This is a "function" command which is not called by a voice command, but by other commands or the plugin. First, the OpenAI_TTS_Response text variable must be set to a phrase which will be spoken or to a valid path to an audio file, and this will be handled appropriately by the speech command. Audio files are only played when the value of OpenAI_TTS_Response matches the value presently in OpenAI_TTS_PreListen or OpenAI_TTS_PreProcess, as these are the phases of a ChatGPT call which are designed to provide feedback to users through a text-to-speech phrase or sound effect. The value of this variable must be the 'When I say' phrase of an existing command in an active VoiceAttack Profile (or a locally/globally referenced Profile). This command also executes a specialized ((OpenAI Sound)) command (by name), yet because that command is not called by the plugin, its name can be anything so long as it matches the 'Execute another command (by name)' action in ((OpenAI Speech)) command which calls it.
See also OpenAI_SpeakChat and OpenAI_Error
| (variable types) | (table of contents) | (back to top) |
Context of a VoiceAttack Plugin Call
default value: Not set
user can set value: (see Plugin Context)
A global text variable providing the literal context of the VoiceAttack plugin call to the OpenAI API. See link above for a complete list. Two context modifiers can be applied individually or simultaneously to ChatGPT context calls only. These are Raw. and .Session, with Session dictating a looping ChatGPT flow until the OpenAI_Chatting# boolean variable becomes False. A Raw ChatGPT call (or Session) is a very trimmed down version of the full-featured ChatGPT method used by this plugin for VoiceAttack. While it does allow the OpenAI_ExternalContinue and OpenAI_ExternalResponder flow controls, 'wait to continue' will not be available outside a .Session context, there is no OpenAI_LogChat or OpenAI_SpeakChat after a return, it has no pre-listen or pre-process feedback options, and only sets the OpenAI_Response text variable to the raw response from OpenAI ChatGPT. The purpose and design of this method is for concurrent ChatGPT requests using a possibly very different OpenAI_SystemPrompt. A Session cannot be established in a Raw ChatGPT call if one is already enabled anywhere (another Raw Session or standard ChatGPT Session), and a non-Session Raw ChatGPT call will bypass OpenAI_ExternalContinue even when True. This is purposefully designed so profiles can use ChatGPT to process data or gather responses to input on the side during a simultaneous ChatGPT session with a completely different OpenAI_SystemPrompt. The plugin never sets, reads, or clears this variable.
This is for profile use only - Context can equally be written directly into the Plugin Action in VoiceAttack:
Embedding Request Input
default value: Not set
user can set value: (see notes)
A global text variable providing the input for an OpenAI Embedding Request plugin call which gets a vector representation of a given input that can be easily consumed by machine learning models and algorithms. The value of this text variable should be set as the input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 8192 tokens in length. In the OpenAI Plugin Sample Profile for VoiceAttack, a test command exists for demonstrating a successful connection to an embedding request, but not a working usage example or application of this highly advanced feature. Refer to OpenAI documenation and their API reference for more details on Embedding Requests. This input variable and the OpenAI_EmbeddingResponse response variable for these plugin calls are separate from the standard input and response text variables so that other plugin systems can be used concurrently without interfering with each other if desired.
Learn more about Embeddings here: https://platform.openai.com/docs/guides/embeddings/what-are-embeddings
Learn more about Embeddings Limitations and Risks here: https://platform.openai.com/docs/guides/embeddings/limitations-risks
Embedding Request Response
default value: Not set
user can set value: NO (read only)
A global text variable containing the response from an OpenAI Embedding Request plugin call which gets a vector representation of a given input that can be easily consumed by machine learning models and algorithms. The value of this text variable will be a newline and "; " (semicolon+space) delimited string containing returned metadata which you can extract, save, and use. An embedding is a vector (list) of floating point numbers. The distance between two vectors measures their relatedness. Small distances suggest high relatedness and large distances suggest low relatedness. In the OpenAI Plugin Sample Profile for VoiceAttack, a test command exists for demonstrating a successful connection to an embedding request, but not a working usage example or application of this highly advanced feature. Refer to OpenAI documenation and their API reference for more details on Embedding Requests. The OpenAI_EmbeddingInput input variable and this response variable for these plugin calls are separate from the standard input and response text variables so that other plugin systems can be used concurrently without interfering with each other if desired. The plugin will never clear this variable, and will only overwrite it with new data in an Embedding Request - there is no need to clear it but profiles can do so when done using it. NOTE: A response will contain mostly metadata which you will be responsible for parsing.
Learn more about Embeddings here: https://platform.openai.com/docs/guides/embeddings/what-are-embeddings
Learn more about Embeddings Limitations and Risks here: https://platform.openai.com/docs/guides/embeddings/limitations-risks
Files System Delete Filename
default value: Not set
user can set value: (see notes)
A global text variable providing the name of the file for a File Delete Request to the OpenAI API. This filename must already exist in the OpenAI Account belonging to the supplied OpenAI API key. The File List plugin call will return a semicolon delimited list of any filenames present in the account, and this is the standard way to set the value of this text variable prior to supplying it to a File Delete plugin context call. See documentation at OpenAI for details on files and files formats. The OpenAI Plugin Sample Profile for VoiceAttack includes working demonstration commands and a sample fine-tuning file in the correct format for the purpose of testing upload, list, and delete commands. The plugin never sets or clears this variable, it can only read it.
Learn more about Files here: https://platform.openai.com/docs/guides/fine-tuning
File System Upload File Path
default value: Not set
user can set value: (optionally)
A global text variable providing the path to the file for a File Upload Request to the OpenAI API. This file must not already exist in the OpenAI Account belonging to the supplied OpenAI API key. The OpenAI_Response text variable will contain a valid file ID of the uploaded file if successful. The File List plugin call will return a semicolon delimited list of any filenames present in the account, and this is an additional way to verify the presence of an uploaded file following a File Upload plugin context call. See documentation on OpenAI for details on files and files formats. The OpenAI Plugin Sample Profile for VoiceAttack includes working demonstration commands and a sample fine-tuning file in the correct format for the purpose of testing upload, list, and delete commands. Uploaded files can be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB, though users can contact OpenAI to request an increase to their storage limit. The plugin never sets or clears this variable, it can only read it.
Learn more about Files here: https://platform.openai.com/docs/guides/fine-tuning
File System Upload File Purpose
default value: "fine-tuning"
user can set value: (see notes)
A global text variable providing the intended purpose of the file for a File Upload Request to the OpenAI API. Use "fine-tune" for Fine-tuning. This allows OpenAI API to validate the format of the uploaded file, which can be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB, though users can contact OpenAI to request an increase to their storage limit. See documentation on OpenAI for details on files and files formats. The OpenAI Plugin Sample Profile for VoiceAttack includes working demonstration commands and a sample fine-tuning file in the correct format for the purpose of testing upload, list, and delete commands. The plugin never sets or clears this variable, it can only read it.
Learn more about Files here: https://platform.openai.com/docs/guides/fine-tuning
| (variable types) | (table of contents) | (back to top) |
Dall-E Image Count
default value: 1
user can set value: 1 to 10 (see notes)
A global text variable providing the number of images that should be returned from an OpenAI Dall-E plugin call. Each request for an image will return at least one URL to that image, set this value to the number of URLs to return. At time of writing, each individual image cost is between $0.016 and $0.02 (USD), making this one of the most expensive features of OpenAI and this Plugin for VoiceAttack. Increasing this value may also increase the time to process a return, therefore the default value is 1 if Not set. Please note that this is a text variable, and the plugin requires it as a text value first before further processing turns it into an integer for the plugin call. CAUTION: This value can increase the cost of an OpenAI API call!
NOTE: At time of writing, the OpenAI documentation specifies that "The Images API is in beta. During this time the API and models will evolve based on your feedback. To ensure all users can prototype comfortably, the default rate limit is 50 images per minute."
OpenAI_ImageSize is a text variable related to this image count option and also influences costs per request.
Learn more about Pricing and Costs here: https://openai.com/pricing
Learn more about Rate Limits here: https://platform.openai.com/docs/guides/rate-limits
Dall-E Image Editing Mask File Path
default value: Not set
user can set value: (see notes)
A global text variable providing the path to the mask image file which corresponds to the image provided in OpenAI_ImagePath for an OpenAI Dall-E Image Editing plugin call. This feature allows you to edit and extend an image by uploading a mask, which is an additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. The transparent areas of the mask indicate where the image should be edited, and the prompt should describe the full new image, not just the erased area. The non-transparent areas of the mask are not used when generating the output, so they don’t necessarily need to match the original image like the examples shown at the page linked below. The uploaded image and corresponding mask must both be square PNG images less than 4MB in size, and also must have the same dimensions as each other (256x256, 512x512, or 1024x1024).
OpenAI_ImagePath is a text variable related to this Image Editing mask file path option.
Learn more about the Images API here: https://platform.openai.com/docs/guides/images
Dall-E Image Editing or Variation File Path
default value: Not set
user can set value: (see notes)
A global text variable providing the path to the actual image file for an OpenAI Dall-E Image Editing or Variation plugin call. The image at this path must be a valid PNG file, less than 4MB, and square, and have dimensions of 256x256, 512x512, or 1024x1024. The plugin always clears this variable at the end of every plugin call regardless of the context.
OpenAI_ImageMaskPath is a text variable related to this image path for Image Editing plugin calls.
Learn more about the Images API here: https://platform.openai.com/docs/guides/images
Learn more about Rate Limits here: https://platform.openai.com/docs/guides/rate-limits
Dall-E Image User Input Prompt
default value: Not set
user can set value: (see notes)
A global text variable that must be set to provide the primary input prompt of an OpenAI Dall-E Image Generation or Editing plugin call. This value may be supplied by text transcribed or translated from audio when using Whisper. plugin context. The subject of Dall-E Input Prompts is vast, so I will only say that being precise and verbose in your descriptions is absolutely essential to making good Image Prompts, perhaps even learning shop terms rarely used by laymen which apply to a particular photographic or artistic style you are hoping to achieve. The supplied OpenAI Plugin Sample Profile contains working demonstrations and extensive comments describing how to use these systems, options for how to gather an image input prompt, and how to work with the results in the form of returned URLs. If profile developers wish, they may present an option to review and save the prompt following a successful use of Dall-E, to share or otherwise make use of again. For this reason, the plugin never clears this variable, and can only read it.
Learn more about improving your Dall-E Image Prompts here:
https://help.openai.com/en/articles/6582391-how-can-i-improve-my-prompts-with-dall-e
Dall-E Image Requests Return Size
default value: 1024x1024
user can set value: 256x256, 512x512, or 1024x1024
A global text variable providing the size of the image(s) to return in any OpenAI Dall-E Image plugin call. Each request for an image will return at least one URL to that image, set this value to dictate the dimensions of every image in all URLs returned. At time of writing, each individual image cost is between $0.016 and $0.02 (USD), making this one of the most expensive features of OpenAI and this Plugin for VoiceAttack. Increasing this value may also increase the time to process a return. CAUTION: This value can increase the cost of an OpenAI API call!
OpenAI_ImageCount is a text variable related to this image size option and also influences costs per request.
Learn more about Pricing and Costs here: https://openai.com/pricing
| (variable types) | (table of contents) | (back to top) |
Text before Event Log User Input Entries
default value: "Asking ChatGPT:"
user can set value: (as desired, or blank)
A global text variable providing the text which would appear in VoiceAttack Event Log entries which print the current user input being sent to a ChatGPT plugin call. If this is null or Not set, the default value will be used. Profiles may set this as they wish, text written to the Event Log by the plugin will never be truncated, and wrap to the next line, so there is no character limit to this variable. By setting this variable but with no text, the raw input will be printed alone. This variable has no effect unless the OpenAI_LogChat boolean variable is True.
OpenAI_LogChat is a boolean required for this Log Chat pre-text option.
OpenAI_LogChat_OutputPretext is a text variable related to this Log Chat pre-text option.
Text before Event Log ChatGPT Response Entries
default value: "ChatGPT Reply:"
user can set value: (as desired, or blank)
A global text variable providing the text which would appear in VoiceAttack Event Log entries which print the returned response in a ChatGPT plugin call. If this is null or Not set, the default value will be used. Profiles may set this as they wish, text written to the Event Log by the plugin will never be truncated, and wrap to the next line, so there is no character limit to this variable. By setting this variable but with no text, the raw response will be printed alone. This variable has no effect unless the OpenAI_LogChat boolean variable is True.
OpenAI_LogChat is a boolean required for this Log Chat pre-text option.
OpenAI_LogChat_InputPretext is a text variable related to this Log Chat pre-text option.
The OpenAI GPT Model to use for a Plugin Call
default value: "ChatGPTTurbo" (or "DavinciText")
user can set value: (see Models List)
A global text variable providing the OpenAI GPT Model to be used for this plugin call. Only specific models will be allowed depending on the type of plugin (and API) call, either for ChatGPT or Completion. As the Dall-E, Embedding, Moderation, and Whisper calls only have singular options for their specialized models, this value is only possible for ChatGPT and Completion calls in the OpenAI Plugin for VoiceAttack.
Learn more about the OpenAI GPT Models here: https://platform.openai.com/docs/models
NOTE: Usage of certain models for the OpenAI API in your own account may depend on access and availability. OpenAI has also specified in their documentation that access to API calls using GPT-4 is "currently in a limited beta and only accessible to those who have been granted access."
OpenAI notes that users can join the GPT-4 waitlist to get access when capacity is available:
https://openai.com/waitlist/gpt-4
Current Version of this OpenAI API Plugin for VoiceAttack
default value: (version of this plugin as downloaded/installed)
user can set value: NO (read only)
A global text variable providing the current full version number in string format of this OpenAI API Plugin for VoiceAttack. When an update is released, this may differ from the current published version. The version number follows a major.minor.patch.build format. Update notifications generated by this plugin will only occur on major and minor version updates. The open source GitHub repository for this plugin will make patch and build branches available, for users to clone and test/review during any future development.
The current published version of this plugin can be scraped from the following page:
https://veterans-gaming.com/semlerpdx/vglabs/downloads/voiceattack-plugin-openai/version.html
Path to the Configuration Folder for this Plugin
default value: "%AppData%\OpenAI_VoiceAttack_Plugin"
user can set value: NO (read only)
A global text variable providing the path to the folder containing all files and folders used by the OpenAI Plugin for VoiceAttack. All other folder paths in this plugin use this as their root folder. This default folder is specific to the individual user account of the local PC, and so multi-user accounts can have different configuration files and folders. If profile developers using OpenAI Plugin for VoiceAttack for their public profiles may not want to use this folder for their profile's config files as it may not exist for new users until the OpenAI Plugin for VoiceAttack has initialized at least once (successfully) for them. The plugin never reads this variable, it can only set it.
See also OpenAI_API_Key_FileFolder, OpenAI_Plugin_ErrorsLogPath, and OpenAI_Plugin_WhisperFolderPath
Path to the Errors Log for this Plugin
default value: "%AppData%\OpenAI_VoiceAttack_Plugin\openai_errors.log"
user can set value: NO (read only)
A global text variable containing the full path to the errors log file which may be written to by this OpenAI Plugin for VoiceAttack. The errors log filename is openai_errors.log and will contain any exceptions thrown by the plugin, along with a timestamp, during use in VoiceAttack. In the event of a file systems failure writing to the default path, the logging system has a redundant secondary fallback path of %PUBLIC%\Documents\openai_errors.log. The plugin never reads this variable, it can only set it.
See also OpenAI_API_Key_FileFolder, OpenAI_Plugin_ErrorsLogPath, and OpenAI_Plugin_WhisperFolderPath
Path to Whisper Audio Files Folder for this Plugin
default value: "%AppData%\OpenAI_VoiceAttack_Plugin\whisper"
user can set value: NO (read only)
A global text variable containing the folder path used for all audio files created (and deleted) automatically by the OpenAI Plugin for VoiceAttack. NOTE: All ".wav" audio files in this folder will be deleted when VoiceAttack launches with OpenAI Plugin, and after every plugin call ends. They can pile up during a chat 'session', but are relatively tiny sound files, and OpenAI Plugin will always clean up after itself. The plugin never reads this variable, it can only set it.
See also OpenAI_AudioFile and OpenAI_AudioPath
| (variable types) | (table of contents) | (back to top) |
Raw Response from OpenAI API Calls
default value: Not set
user can set value: NO (read only)
A global text variable containing the raw unedited response from any OpenAI API plugin call in VoiceAttack (except Embedding, see OpenAI_EmbeddingResponse). The data contained in this variable will depend on the context of the plugin call, naturally, but in the case of ChatGPT plugin calls, this will contain the raw response while the OpenAI_TTS_Response text variable may have minor post-processing applied for text-to-speech optimizations. ChatGPT calls which have the .Raw context modifier will Not set the OpenAI_TTS_Response text variable, and will only return raw responses in this variable. The value of this variable may also contain erroneous data or a literal error message when the OpenAI_Error boolean variable is True following a plugin call. This response may require post-processing by the profile depending on the context of the plugin call, and the OpenAI Plugin Sample Profile for VoiceAttack has examples and comments describing these possible scenarios for each example command and function. The plugin always clears this variable at the beginning of every plugin call regardless of the context.
See also OpenAI_ResponseCode, OpenAI_ResponseLinks, OpenAI_TTS_Response, and OpenAI_Error
Code Blocks from Responses to ChatGPT OpenAI API Calls
default value: Not set
user can set value: NO (read only)
A global text variable containing any code blocks inside ChatGPT responses from any OpenAI API ChatGPT context plugin call in VoiceAttack (except .Raw). The data contained in this variable will be culled from the OpenAI_TTS_Response text variable as minor post-processing applied for text-to-speech optimizations. This response itself may requires post-processing by the profile depending on the context of the plugin call, and number of code examples from ChatGPT provided - and as always, any code examples should be tested and cross-referenced for accuracy. The plugin always clears this variable at the beginning of every ChatGPT plugin call prior to sending valid input prompts to the Open API.
See also OpenAI_Response, OpenAI_ResponseLinks, OpenAI_TTS_Response, and OpenAI_Error
Hyperlinks from Responses to ChatGPT OpenAI API Calls
default value: Not set
user can set value: NO (read only)
A global text variable containing any hyperlinks inside ChatGPT responses from any OpenAI API ChatGPT context plugin call in VoiceAttack (except .Raw). The data contained in this variable will be culled from the OpenAI_TTS_Response text variable as minor post-processing applied for text-to-speech optimizations. The value of this text variable will be a ";" (semicolon) delimited string containing URL's which you can use directly in a Get Choice input action in VoiceAttack (or when just one, open the link directly). As such, this response itself may requires post-processing by the profile depending on the number of hyperlinks from ChatGPT provided - and as always, any hyperlinks should be reviewed carefully before opening. The plugin always clears this variable at the beginning of every ChatGPT plugin call prior to sending valid input prompts to the Open API.
See also OpenAI_Response, OpenAI_ResponseCode, OpenAI_TTS_Response, and OpenAI_Error
Text-to-Speech Response from OpenAI API Calls
default value: Not set
user can set value: NO (read only)
A global text variable containing the text-to-speech response from any OpenAI API plugin call in VoiceAttack which returns speech. This variable is also used to pass any phrase to be spoken or path to audio files to be played by the OpenAI plugin for VoiceAttack. The data contained in this variable will depend on the context of the plugin call, naturally, but in the case of ChatGPT plugin calls, responses in this variable may have minor post-processing applied for text-to-speech optimizations. The value of this variable may also contain erroneous data or a literal error message when the OpenAI_Error boolean variable is True following a plugin call. This response may require post-processing by the profile depending on the context and parameters of the plugin call, and the OpenAI Plugin Sample Profile for VoiceAttack has examples and comments describing these possible scenarios for each example command and function. The plugin always clears this variable at the beginning of every plugin call regardless of the context.
See also OpenAI_Response, OpenAI_ResponseCode, OpenAI_ResponseLinks, OpenAI_Error, and Text-to-Speech Variables
Completion Stop Sequences
default value: Not set
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide stop sequences to the OpenAI API for use in Completion plugin call. Stop sequences are used by the API to determine when to stop generating text and return the completed result to the user. When a value has been set for this variable, the API will use those stop sequences. Up to 4 sequences can be provided where the API will stop generating further tokens, and the returned text will not contain the stop sequence. These are most appropriate in non-verbal chat completion applications, but I will be interested to see how VoiceAttack profile developers may make use of this as it applies to voice command functions. The plugin never sets or clears this variable, it can only read it.
ChatGPT System Prompt
default value: (see below)
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a custom System Prompt for a ChatGPT plugin call. This is easily one of the most powerful and interesting features of the OpenAI ChatGPT API, as it can be used to tailor a particular chat for a specific purpose which returns responses to Input Prompts as directed by these System Prompts. By default, when Not set by users, the OpenAI Plugin for VoiceAttack has ChatGPT requests set with a special System Prompt to help ensure responses will work well with text-to-speech in VoiceAttack for engaging and interactive verbal communications with ChatGPT. The plugin never sets or clears this variable, it can only read it.
Default System Prompt:
As ChatGPT in TTS mode, I'll provide brief and accurate responses to your input suitable for text-to-speech use. I'll round any decimals to one place for simplicity. To ensure a faster response, I'll limit the length of my answers, but I'll try to be as complete as possible. I won't provide code examples or any other formatted text that won't work well with text-to-speech.
See also OpenAI_UserInput_Example and OpenAI_ChatbotOutput_Example
User Input Prompt
default value: Not set
user can set value: (see notes)
A global text variable that must be set to provide the primary input of a plugin call which requires it, with the exception of Images and Embedding. This value may be replaced by text transcribed or translated from audio when using Whisper. plugin context. When set to a new value manually after a Response phase and before a GetInput phase of a ChatGPT plugin call with .Session context, this value will be used directly, again, unless overwritten by a Whisper audio processing. The plugin always clears this variable at the beginning of every plugin call regardless of the context.
See also OpenAI_UserInput_Last
Previous User Input Prompt
default value: (see notes)
user can set value: NO (read only)
A global text variable containing the value of the very last user input prompt that was sent to a ChatGPT and Completion context plugin call to the OpenAI API. This is only for profile developers to use as needed, such as comparing a new input to a previous input for a bypass or other function. The plugin never clears this, but obviously overwrites it when a new input prompt has been utilized.
See also OpenAI_UserInput
ChatGPT User Input Example
default value: (see below)
user can set value: (see notes)
A global text variable containing the value of an example input prompt which corresponds to an example Chatbot output prompt for a ChatGPT plugin call. These are an effective way to restore a previous conversation, when combined with a system which sets these variables using numbered variable name variants (see below) from saved values stored between sessions! Both this variable and a corresponding OpenAI_ChatbotOutput_Example must be set for the plugin to read and apply their contents to a ChatGPT call or Session. These are used to further reinforce and refine the provided OpenAI_SystemPrompt, restore previous chat sessions, and/or to help establish the pattern which ChatGPT should follow for given inputs in its responses to them. The plugin never sets or clears these variables, it only reads them.
Any number of input and output examples can be provided by adding the number to the end of the variable name such as OpenAI_UserInput_Example1 and OpenAI_ChatbotOutput_Example1 (number 1 will override this variable, they are the same), and of course incrementing that number by one for the variable names of each subsequent input/output pair.
NOTE: Numbered variable names are how you load a previous chat session conversation on Profile or VoiceAttack launch. Care should be used, as it may be unneccessary to provide more than a certain number of the most recent interactions to get ChatGPT back on track, but the only limits would be the OpenAI API itself. If numbered input and output example text variables are used, these WILL NOT be cleared after they are applied to a ChatGPT OpenAI API call - profile developers are responsible for clearing these if used so that subsequent calls from other commands to the ChatGPT system in this plugin do not errantly apply inapplicable examples from a previous call. Once a session has been established, these are no longer read by that same session and are safe to clear. When
OpenAI_UserInputis set to a text value of((reprocess))before executing aChat.Sessionplugin context (with any context modifier), it will immediately enter the 'wait to continue' phase and setOpenAI_ChatWaiting#toTrue- this would be the cue to clear the input/output variable values toNot setin VoiceAttack profile systems using these. Next time the user executes a 'begin chat session' type voice command, it will merely wake from its sleep loop and enter a 'GetInput' phase, now recalling any previously reloaded inputs and their responses. The number of loaded input/output pairs increases the time to establish the initial chat session if very many, and may be a factor in OpenAI pricing for ChatGPT calls to the OpenAI API (I am uncertain at time of writing).
Default User Input Example: Is a duck billed platypus venomous?
See also OpenAI_SystemPrompt and OpenAI_Context
ChatGPT Chatbot Output Example
default value: (see below)
user can set value: (see notes)
A global text variable containing the value of an example Chatbot output prompt which corresponds to an example User input prompt for a ChatGPT plugin call. These are an effective way to restore a previous conversation, when combined with a system which sets these variables using numbered variable name variants (see below) from saved values stored between sessions! Both this variable and OpenAI_UserInput_Example above, including a non-default OpenAI_SystemPrompt, must be set for the plugin to read and apply their contents to a ChatGPT call or Session. These are used to further reinforce and refine the provided OpenAI_SystemPrompt, restore previous chat sessions, and/or to help establish the pattern which ChatGPT should follow for given inputs in its responses to them. The plugin never sets or clears these variables, it only reads them.
Any number of input and output examples can be provided by adding the number to the end of the variable name such as OpenAI_UserInput_Example1 and OpenAI_ChatbotOutput_Example1 (number 1 will override this variable, they are the same), and of course incrementing that number by one for the variable names of each subsequent input/output pair.
NOTE: Numbered variable names are how you load a previous chat session conversation on Profile or VoiceAttack launch. Care should be used, as it may be unneccessary to provide more than a certain number of the most recent interactions to get ChatGPT back on track, but the only limits would be the OpenAI API itself. If numbered input and output example text variables are used, these WILL NOT be cleared after they are applied to a ChatGPT OpenAI API call - profile developers are responsible for clearing these if used so that subsequent calls from other commands to the ChatGPT system in this plugin do not errantly apply inapplicable examples from a previous call. Once a session has been established, these are no longer read by that same session and are safe to clear. When
OpenAI_UserInputis set to a text value of((reprocess))before executing aChat.Sessionplugin context (with any context modifier), it will immediately enter the 'wait to continue' phase and setOpenAI_ChatWaiting#toTrue- this would be the cue to clear the input/output variable values toNot setin VoiceAttack profile systems using these. Next time the user executes a 'begin chat session' type voice command, it will merely wake from its sleep loop and enter a 'GetInput' phase, now recalling any previously reloaded inputs and their responses. The number of loaded input/output pairs increases the time to establish the initial chat session if very many, and may be a factor in OpenAI pricing for ChatGPT calls to the OpenAI API (I am uncertain at time of writing).
Default Chatbot Output Example: Yes, but only the male platypus has venomous spurs on its hind legs. These spurs are used for self-defense and can deliver a potent venom that causes extreme pain and swelling.
See also OpenAI_SystemPrompt and OpenAI_Context
| (variable types) | (table of contents) | (back to top) |
I try to think about localization and other options when designing VoiceAttack systems which use text-to-speech, and my profiles read a text variable such as these below rather than hard setting the speech text into the VoiceAttack 'Say Something with Text-To-Speech' actions inside commands. This way, users could replace every phrase with a different language, prose, or manner of speaking, and tailor their experience to their personal wants or needs. They can even be set as a file path to an existing audio file of pre-recorded speech or sound effects and these will be played instead of spoken.
The way this concept works is as follows: The value of one of these TTS variables below is set as the value of the global OpenAI_TTS_Response text variable just before executing the speech command in the VoiceAttack profile using this OpenAI API Plugin. The 'Say Something with Text-To-Speech' action in that speech command is set to speak whatever text is contained in the OpenAI_TTS_Response variable, unless it is a valid path to an audio file, in which case it plays that sound file until it is complete, and then the speech command exits allowing the plugin to move onto the next step in its flow.
Feel free to change any/all of these as desired for personal or public profiles which use the OpenAI Plugin for VoiceAttack. You can set them once when a profile loads or before any individual plugin call on the command level, as appropriate. Not just for different languages, but even different options. Phrases separated by a ";" (semicolon) will allow VoiceAttack to randomly choose just one of the phrases, for even more organic feeling variation and immersion to these otherwise required hard-coded text-to-speech phrases used throughout these plugin systems.
For example: "The requested file was not found, or an error has occurred.;I'm sorry, Dave. I'm afraid I can't do that." (...you get the idea, have fun with it!)
See 'Dynamic response sections' around page 53 of the VoiceAttack Manual for more details:
https://voiceattack.com/VoiceAttackHelp.pdf
Text-to-Speech Pre-Listen User Feedback
default value: Not set
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used before capturing input through Dictation text and audio capture. An example of a phrase which would be appropriate for this text-to-speech variable would be "Yes?". When this text-to-speech variable is provided as a path to an audio file instead of a text phrase to be spoken, it will only ever be played one time. The plugin never sets or clears this variable, it can only read it.
Text-to-Speech Pre-Process User Feedback
default value: Not set
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used before processing chat session input through OpenAI API (which can be slow!). An example of a phrase which would be appropriate for this text-to-speech variable would be "One moment please.". When this text-to-speech variable is provided as a path to an audio file instead of a text phrase to be spoken, the OpenAI_Loop_PreProcess boolean variable may be set to True to enable looping of this sound effect until the OpenAI API responds to a request, signified by the OpenAI_TTS_Response text variable being set to a new (not empty) value. The plugin never sets or clears this variable, it can only read it.
OpenAI_Loop_PreProcess is a boolean related to the Looping Pre-Process sound option noted above.
Text-to-Speech Moderation Content Flagged Message
default value: "The input provided has been flagged as inappropriate."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when Moderation Check plugin calls identify the input as flagged. The plugin never sets or clears this variable, it can only read it.
OpenAI_ContentFlagged is a boolean related to Moderation context plugin calls.
Text-to-Speech File Delete Failure Message
default value: "The requested file was not found, or an error has occurred."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when File Delete plugin calls fail. The plugin never sets or clears this variable, it can only read it.
| (variable types) | (table of contents) | (back to top) |
Text-to-Speech File Delete Success Message
default value: "The requested file has been deleted."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when File Delete plugin calls succeed. The plugin never sets or clears this variable, it can only read it.
Text-to-Speech File List Failure Message
default value: "There are no files found in this account."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when File List plugin calls fail. The plugin never sets or clears this variable, it can only read it.
Text-to-Speech File List Success Message
default value: "The list of files has been assembled."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when File List plugin calls succeed. The plugin never sets or clears this variable, it can only read it.
Text-to-Speech File Upload Failure Message
default value: "The requested file was not found, or an error has occurred while uploading."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when File Upload plugin calls fail. The plugin never sets or clears this variable, it can only read it.
Text-to-Speech File Upload Success Message
default value: "The requested file has been uploaded."
user can set value: (optionally)
A global text variable that can be optionally set by the user to provide a customized text-to-speech phrase used when File Upload plugin calls succeed. The plugin never sets or clears this variable, it can only read it.
| (back to top) |








