A package for project 3 for stuytowners
Project description
Contributors
Python Package: Foo Barstein
What is this package?
This package was created so you can have Professor Foo Barstein talk with you straight from your terminal. Professor Barstein can do four things - tell you a joke, tell you a haiku, tell you a compliment, and write you an email. Professor Barstein is a fictional character and powered by GPT-3.
Features
-
gptchat: will take the role of Professor Foo Barstein and use ChatGPT to generate a joke, haiku, compliment, or an email so you don't have to be lonely in your terminal anymore.
-
cowtalk: will take the response from ChatGPT-3 and add "moo" every 3 words so you can talk with cows!
-
onewordperline: onewordperline will play around with how the text is displayed. Instead of left to right, you will be reading from top to bottom.
-
changepreset: changepreset will change how ChatGPT answers your question. Use this function to give ChatGPT a different role than Professor Foo Barstein!
How to Run demo
- Set your OpenAI API Key by writing the following command in the shell:
export OPENAI_API_KEY=(your key)
- Run demo.py with the pipfile with the following command:
pipenv run python demo.py
How to run tests
- go to tests folder by writing the following command in the shell:
cd tests
- install all necessary packages by writing the following command in the shell:
pip install openai
pip install pytest
- Set your OpenAI API Key by writing the following command in the shell:
export OPENAI_API_KEY=(your key)
4.run tests by writing the following command in the shell:pytest test_functions.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.