Skip to content

Always wanted your queries to be answered by your regular dude Brad/Chad/Whatshisname? We've got you covered

License

Notifications You must be signed in to change notification settings

kocmana/chad-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chad-GPT

About

Chad-GPT in Action
Figure 1. Chad-GPT in Action

Chad is a command line tool that provides you with the entire knowledge of Chat GPT in your terminal.

Well…​ kind of.

The application makes use of a lesser known capability of ChatGpt, its at times hilarious potential to leverage personas in responses.

Stack

The application is a thin wrapper over the Open AI API using

  • Java 17

  • Spring Boot 3.1

  • Maven

Setup

Preconditions

  • OpenAI API Key: The application requires an OpenAI API key to be available as environment variable with the key CHAT_GPT_API_KEY.

💡

Open API Access

Chad-GPT requires a valid OpenAI Platform API Key to work. To get such an API key, you will need to register with OpenAI first.

At the time of writing, these API keys included a free trial usage of 5$ which gets you surprisingly far.

Basic Setup

  1. Clone the repository using

    https://github.com/kocmana/chad-gpt.git
  2. Package the application using

    mvn clean package
  3. Run the created target/chad-gpt-1.0.0-SNAPSHOT.jar using

    java -jar chad-gpt-1.0.0-SNAPSHOT.jar what is YOUR_QUERY_HERE

Extended Setup

  1. Copy the created jar file to a suitable location of your liking

  2. On MacOS/Linux: Open ~/.zshrc or your Bash/ZSH configuration location and add an alias e.g.:

    alias chad="CHAT_GPT_API_KEY=YOUR_API_KEY_HERE java -jar chad-gpt-1.0.0-SNAPSHOT"
  3. Run chad with ease using:

    chad tell me how to get my kids to sleep.

Commands and Options

Commands

ChadGPT currently provides the following commands:

tell me/say

The command will provide a response to the subsequent query.

Two options are supported:

Table 1. Tell me options
Argument Alias Required Default

query

yes

as

persona

no

CHAD

help

The command provides the default help text autogenerated from Spring Shell.

Available Personas

The following table provides an overview of all supported personas along with the used assistant descriptions and additional query hints that are being used.

Table 2. Available Personas
Persona Assistant Description Query Hint

CHAD

You are a stereotypical chad.

Answer as if you were a stereotypical chad.

THREE_YEAR_OLD

You are helpful assistant providing support to a three year old kid.

Answer as if you would explain it to a three year old kid.

GRANNY

You are a helpful old grandmother.

Explain the following as if you would be an old grandmother.

POE

You are a helpful assistant talking like the author Edgar Allen Poe.

Answer the following query as if you would be Edgar Allen Poe.

About

Always wanted your queries to be answered by your regular dude Brad/Chad/Whatshisname? We've got you covered

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages