Machine Learning

Machine Learning in Linux: chatGPT-shell-cli – chatGPT and DALL-E tool

Our Machine Learning in Linux series focuses on apps that make it easy to experiment with machine learning. chatGPT-shell-cli appears an interesting project to feature as it’s a simple script to use OpenAI’s chatGPT and DALL-E from the terminal without needing to install either Python or Node.js.

ChatGPT is an artificial-intelligence chatbot launched in November 2022. It is built on top of OpenAI’s GPT-3.5 and GPT-4 families of large language models and has been fine-tuned using both supervised and reinforcement learning techniques.

Large Languages Models trained on massive amount of text can perform new tasks from textual instructions. They can generate creative text, solve maths problems, answer reading comprehension questions, and much more.

Installation

We tested chatGPT-shell-cli on Manjaro and Ubuntu. On Manjaro, there’s a package in the Arch User Repository, which can be installed with the command:

$ yay -s chatgpt-shell-cli

You don’t really need a package though, given that chatgpt-shell-cli is just a shell script.

You need to set your OPENAI_KEY to use this script. As we’re using the bash shell, we add the following line to the file .bashrc

export OPENAI_KEY=our_key_here

Log out of the shell or enter the command:

$ source .bashrc

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
James Devonshire
James Devonshire
1 year ago

Is the API key free?

kcdtv
kcdtv
11 months ago

The key is free but you need to create an account and you will need to provide a valid phone number.