Skip to content

GPTalk is a command-line tool that utilizes OpenAI's GPT model to generate human-like language responses based on user prompts.

License

Notifications You must be signed in to change notification settings

rigelcarbajal/GPTalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

GPTalk

GPTalk is a script that interacts with the OpenAI API to generate human-like language based on a given prompt.

The script is written in Bash and utilizes cURL to make HTTP requests to the OpenAI API. It assigns the first argument passed to the script as the prompt and sends it to the API for processing. The generated content is extracted from the API response and printed to the console.

Requirements

  • Bash shell environment (macOS, Linux)
  • cURL command-line tool

Installation and Usage

  1. Clone or download the GPTalk repository to your local machine.
  2. Open a terminal and navigate to the project directory.
  3. Set the necessary variables inside the file:
  • OPENAI_KEY: Your OpenAI API key. ( Get an API KEY here )
  • OPENAI_URL: The OpenAI API endpoint URL.
  • OPENAI_ROLE: The role for the prompt (default: "user").
  • OPENAI_MODEL: The OpenAI model to use (default: "gpt-3.5-turbo").
  1. Make the script executable by running the following command:
   chmod +x GPTalk.sh
  1. Move the script to a suitable location, such as the bin folder, to make it accessible system-wide. For example:
	mv GPTalk.sh /usr/local/bin/gptalk
  1. Open a new terminal window or reload your shell configuration.
  2. To generate content, run the following command:
	> gptalk Enter your prompt here

Replace "Enter your prompt here" with your desired prompt.

About

GPTalk is a command-line tool that utilizes OpenAI's GPT model to generate human-like language responses based on user prompts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages