- Python example app - follow these steps first to generate your virtual env with dependencies and put your OPENAI_API_KEY in an .env file and test your integration.
completeSentence.py
- completes your sentence when you add a prompt. Some things to try "A long time ago in a galaxy far, far away..." or "The quick brown fox ". You can also request prompts in a style of writing, or other things, such as "Write a scene from the tv show Mad Men with Don Draper in 1980's New York: "tunedTweet.py
- Creates a tweet based on a tuned babbage engine. If this doesn't work, just replace the engine with a generic. See Fine tuning for details.sentimentAnalysis.py
- Scrape tweets and analyse sentiment. Choose 1 to do both or if you already have a CSV, run 2. Note that you shouldn't grab more than 25 tweets or so as you may run out of OpenAI tokens.gpt4sample.py
- Working example from Chat completions introduction.gpt4code.py
- Modified sample to output code from GPT-4.gpt4chat.py
- Simple GPT-4 chatbot.
Create & activate new virtual environment
$ python -m venv venv
$ . venv/bin/activate
Install the requirements
$ pip install -r requirements.txt
Run an app in the venv terminal with the python
command. For example:
python completeSentence.py