Terminal GPT: ChatGPT on Linux terminal without API Key
robort - 2023-04-29 20:52:31
Most of the applications that allow you to interact with ChatGPT and the GPT generative model from a Linux Terminal require authentication via the OpenAI API Keys. This is the case with Shell GPT, here an example of its use for generating commands from the Shell, but the same requirement is required when creating an application based on this particular LLM.
GPT terminal and Bai chatbot
Terminal GPT is instead an Open Source solution based on the GO language that allows you to communicate with ChatGPT without the need to generate and use any API Key. This is because it is a wrapper of the Bai chatbot service, in essence it interacts directly with the latter's backend.
When used from a web browser, Bai chatbot presents an interface very similar to that of ChatGPT. The project developers have also created The BAI Telegram Bot specifically dedicated to the competitor instant messaging application of WhatsApp.
Install Terminal GPT
There are two ways to install GPT Terminal on Linux. The first is to use GO by issuing the following statement:
go install github.com/aandrew-me/tgpt@main
The second is to use the curl library using the following command:
curl -sSL https://raw.githubusercontent.com/aandrew-me/tgpt/main/install | bash
If all goes well you should get a result similar to the one shown in the image:
At this point it is possible to initialize Terminal GPT by running the command:
tgpt -h
And you can ask the chatbot any question directly from Terminal.
Limit the Terminal GPT
Terminal GPT produces the same outputs as Bai chatbot and for this reason it has the same limitations. The basic engine, at least for the moment, is GPT 3.5 and not having direct access to the API, the user cannot select a different one. In the same way, some parameters are not available, such as the temperature for example, which allow you to set the way (creative or rigorous) in which the answers are returned.