Skip to content
/ oi-gpt Public

オイ, GPT ! Summon ChatGPT using API into your cli ! Everything in this repo was generated using AI ! Why ? Just for fun.

Notifications You must be signed in to change notification settings

AlrikRr/oi-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

オイ, GPT !

Oi GPT

This Python script uses the OpenAI API to generate responses to questions using CHATGPT. It supports three different modes of operation, specified by a single command-line argument:

  • -h: Display a help menu that explains how to use the script.
  • -c: Start an infinite loop to ask questions and receive answers. The loop continues until the user enters exit.
  • phrase: A string that represents the question to ask CHATGPT.

Requirements

  • Python 3.x
  • OpenAI API key
  • The openai library: pip install openai
  • Clipboard library for your operating system: win32clipboard for Windows, subprocess for macOS and Linux
  • Install xsel for Linux system

Usage

python script.py [-c | phrase]
  • -c: Start an infinite loop to ask questions and receive answers.
  • phrase: The phrase to ask CHATGPT. Enclose the phrase in quotes if it contains spaces.

Output

The script outputs the response from CHATGPT to the console and saves it to the system clipboard.

Note

This script was generated using OpenAI's CHATGPT language model.

About

オイ, GPT ! Summon ChatGPT using API into your cli ! Everything in this repo was generated using AI ! Why ? Just for fun.

Topics

Resources

Stars

Watchers

Forks

Languages