Skip to content

PyCli-GPT is a Python CLI inspired by Chat-GPT that answers questions and assists with tasks using OpenAI's GPT technology. It's a demonstration project for Flatiron School, emphasizing software engineering concepts and Python skills, utilizing packages like prettycli and faker.

Notifications You must be signed in to change notification settings

codetombomb/cli-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pycli-gpt-title

Video Demo

pycli-gpt-demo.mp4

Introduction

PyCli-GPT is a Python CLI works like Chat-GPT and is an application that provides helpful information, answer questions, and assist users with various tasks using the power of OpenAI's GPT (Generative Pre-trained Transformer) technology. Whether you need information, creative ideas, or assistance with specific tasks, PyCli-GPT is here to help, all within the familiar confines of your terminal.

About

PyCli-GPT was created as a demonstration project for Software Engineering students at Flatiron School. It serves as a showcase of various software engineering and Python programming concepts, including the separation of concerns, Object Relational Mappers, entity relationships, database evolution with migrations, database population using seed data, and database constraints using SQLAlchemy and Alembic. This project was also geared toward showcasing fun PyPi packages like:

Usage

This project is meant for you to run locally on your own computer

To use this application, you will need to obtain a paid API key from OpenAI.

Learn more about OpenAI's API billing here: OpenAI Pricing

This project utilizes the GPT-3.5 Turbo model.

Getting Started

Signing Up for OpenAI API Paid Account

Head over to OpenAI's website and sign up for an account:

Screenshot 2023-09-27 at 11 06 00 PM

Once you have signed up and are logged in, click on the "Usage" option in the left navigation pane. Click on the "set up paid account" link:

Screenshot 2023-09-28 at 11 41 46 PM

Click on the "Start payment plan" button and select the "Individual" option:

Screenshot 2023-09-28 at 11 54 16 PM

Fill out the credit card form and submit.

Generating a new API key

Click on the "View API Keys" option in the dropdown. Then, click on the "Create new secret key" button:

Screenshot 2023-09-27 at 11 39 27 PM

Name your new API key:

Screenshot 2023-09-28 at 12 10 40 AM

Copy your new API key and paste it somewhere safe. We will be using it in the Installation section:

Screenshot 2023-09-28 at 12 11 31 AM

Installation

This project uses Python version 3.8.13.

  1. Fork and clone this repository onto your computer.
  2. In the root directory, create a .env file and add the following line: OPENAI_API_KEY=REPLACE_WITH_YOUR_OPENAI_API_KEY
  3. In the terminal, run: pipenv install && pipenv shell
  4. cd into the lib directory and run alembic upgrade head

Running the app

  • In the lib directory, run: python cli.py

About

PyCli-GPT is a Python CLI inspired by Chat-GPT that answers questions and assists with tasks using OpenAI's GPT technology. It's a demonstration project for Flatiron School, emphasizing software engineering concepts and Python skills, utilizing packages like prettycli and faker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published