AI Chat Help
AI Chat is a ChatGPT client for the BTSpeak. Whenever this help file mentions AI Chat, it is referring to the BTSpeak app you are using. When it mentions ChatGPT, it is specifically referring to OpenAI's artificial intelligence service, based in the cloud.
AI Chat is found in the Applications > Web menu.
To use AI Chat, you first need to have generated an OpenAI key, and then fund it with at least $5. OpenAI no longer provides a free tier of access for newly-generated keys. This key is essential for accessing ChatGPT.
For details on obtaining and installing your key on the BTSpeak, see the OpenAI Key help topic.
If you place your OpenAI key in a text file in the Public directory, with the word "key" anywhere in its name, when you run AI Chat it will look for this file and automatically move the key to the correct location in your home directory.
AI Chat is a self-voicing app. This means that after you send ChatGPT your question, it will automatically read out the answer to you. You can stop speech at any time by pressing Dots 7 and 8 together.
AI Chat was originally designed for DECtalk and supports a variety of unique DECtalk features when reading out information. For example, italics are spoken in a slightly higher pitch, bold slightly louder than regular text, and headings are spoken in a higher pitch. Specific information is spelled out, and programming code is read with a higher punctuation level. If you are using DECtalk when you run AI Chat, it will auto-detect DECtalk and utilize the DECtalk enhancements. However, if you prefer to use a different TTS engine, AI Chat adapts and still announces headings, quotes, bullet points, and more.
For new users, AI Chat welcomes you and provides information on key commands. After five uses, the welcome message is trimmed.
When you hear the message "Enter prompt:", you are able to Braille or type your question for ChatGPT (termed a prompt), and press Enter.
After a short delay, the response will be spoken in full. If you don't wish to hear the entire response, press Dots 7 and 8 together to stop speech.
At the moment, AI Chat operates a little differently from most other BTSpeak apps. This is because it is built around a mainstream ChatGPT script for Linux. We are working on enhancing the BTSpeak integration in upcoming releases.
Essentially, you either type your question and press Enter, or you type a specific command and press Enter. You can use H-chord for help, but Z-chord does not exit the app at this time.
Note: If you access your BTSpeak using SSH from another computer, you can run AI Chat, type your questions, and the responses will be spoken by the BTSpeak, as well as being sent to your computer screen.
ChatGPT is made aware of the current date and your BTSpeak locale, so it knows the country and language conventions for where you are based. It also knows you are using a BTSpeak running Linux, and that it is using synthetic speech to communicate with you. It knows if your speech is set to DECtalk. This means you can instruct it (with varying results) to use DECtalk commands to control its spoken output.
ChatGPT has no access to any personal information about you, but you can inform it of your name or nickname if you want it to address you directly. Instructions for setting this are provided below.
You can also let it know your interests and preferences for how you prefer information to be presented to you. You can update your name and interests at any time. They will be provided to ChatGPT the next time you use the AI Chat app.
While in the current AI Chat session, your prior questions and answers are made available to ChatGPT, so it is easy to get clarification or refine your query. The more context ChatGPT has, the more accurate and relevant its responses will be. It is not very good at guessing, but specific questions usually get specific and more relevant answers. However, if you quit the app and restart it, be aware that ChatGPT does not have access to any of your prior conversations.
By default, AI Chat keeps a running history file containing your questions and answers, adding to this file each time you use the app. If you do not wish your queries and responses to be written to the history file, this setting can be disabled or re-enabled. (See commands below.)
Here are the current AI Chat commands and how to use them (case doesn't matter):
To stop speech at any time, including the start-up message, press Dots 7 and 8 together, or press Enter on a blank line.
To exit the app, press q and press Enter.
To review the raw GPT response, not pre-formatted for speech output, press r and Enter.
To read the speech-friendly pre-processed markdown response, press p and Enter.
To flip between gpt-4turbo-preview and gpt-4o models, type FlipModel (all one word) and Enter. The model setting will also be updated in your config file for future sessions.
To check which model is active, type ModelStatus (all one word) and Enter;
To disable writing to the history file, type HistoryOff (all one word) and Enter.
To re-enable writing to the history file, type HistoryOn (all one word) and Enter.
To check the history writing status, type HistoryStatus (all one word) and Enter.
To let ChatGPT know your first name or nickname, type MyName=Name (all one word, using the equals sign) and Enter. Your name will be added to the config file, and next time you run the app, your name will be supplied to ChatGPT.
To tell ChatGPT some details about your interests, type IAm=any details you wish to provide to ChatGPT. The words "I am" and all text to the right of the equals sign are added to the config file and made available to ChatGPT in subsequent sessions. For example, you might type IAm=interested in assistive technology, Linux, and cooking.
To check what IAm details are in your config file, you can use the iamstatus command. If there are changes you wish to make to your IAm information, you can issue another IAm= command, and your new details will overwrite the earlier IAm details. You can also edit the config file to fine-tune your IAm information.
AI Chat automatically configures the best ChatGPT model supported by your OpenAI key. For funded keys, it defaults to gpt-4o, which is the smartest and latest GPT-4 model (knowledge current to October 2023). You can also flip the model to gpt-4-turbo-preview which is a bit slower, but includes much more general knowledge. Its current to September 2023. You can flip back and forth between these two models at any time.
Please note: although we always request the highest available model for your key, OpenAI sometimes directs the request to a lower model, depending on server load. This is particularly common when set to gpt-4-turbo-preview. It can be helpful to ask ChatGPT "how current is your data?" to ascertain if you are on GPT-3 or GPT-4. To be doubly sure, ask a factual question like "who is the president of ..." to ensure the model data is up-to-date. If it is September 2021, you can try using the flipmodel command and ask again.
The history.txt file is stored in the following location:
/home/pi/BTSpeak/ai-chat/history.txt
To find and open the history.txt file with the file browser:
From your home directory, navigate to BTSpeak and press Enter to enter that directory.
Then navigate to ai-chat and press Enter to enter the directory.
Lastly, navigate to history.txt and press Enter to open the file in the editor.
AI Chat uses a config file to store various user settings. With the history, name, and IAm commands listed above, and automatic model selection, most users should have little need to access the config file.
The config file allows you to adjust speech settings if you use DECtalk, as well as tailoring the model, prompts, and information provided to ChatGPT when you use AI Chat. The config file contains numerous comments to explain its options.
The config file is located at:
/home/pi/.config/ai-chat/ai-chat.conf
Note: You will need to enable hidden files in the file browser by pressing h in order to find and enter the .config directory.
[{epilogue}]