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.
DOCUMENTATION
Installation
- Install the package by writing the following command in the shell:
pip install funnygpt==1.0.8 - set your openai api key using:
export OPENAI_API_KEY=(your key) - Import the package by writing the following command in the shell:
import funnygpt
- if this step does not work on your machine, try running:
pip install --upgrade httpx httpcore
- Run the following command in the shell to see some functionality!:
funnygpt.gptchat('joke)
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!
Functions Documentation
default preset:
The preset can be changed, the default preset gives a setting for initial generation, the user can change preset by using changepreset() function.
preset = "You are the most chill cs professor in the world, Professor Foo Barstein. You are talking to me, a student in your class."
gptchat(type, preset)
Types: "joke", "haiku", "compliment", "email"
example: test_joke=functions.gptchat("joke", "software engineers")
cowtalk(input)
example: test_cowtalk=functions.cowtalk(test_joke)
onewordperline(input)
example: test_onewordperline=functions.onewordperline(test_joke)
changepreset()
This function will enable the user the manually change the preset of the previous functions
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 openaipip 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
Release files for funnygpt 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| funnygpt-1.0.9.tar.gz | 17.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| funnygpt-1.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.3 kB
Release files / funnygpt-1.0.9.tar.gz
| Download URL | funnygpt-1.0.9.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0694571e8e5864fb9e26dc1ffd8cb683ce4659355ceebb25301045ded8fd4b6a
|
|
BLAKE2b-256 checksum How to use checksums |
a8a56f29f2e5297f497ece0ed9489e4c7eef03458034f58516c3c38bb993a237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.3
|
Release files / funnygpt-1.0.9-py3-none-any.whl
| Download URL | funnygpt-1.0.9-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f830af27b47d88e8e923cc8e901e6c2d2b405e6227a6ef6b777182aedfca06c3
|
|
BLAKE2b-256 checksum How to use checksums |
59969e9265e0ce86a36df88533daac6a64b3a9a74fff3cb29765970d2611d5e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.3
|