Basic-OpenAI-API-Scripts
Basic-OpenAI-API-Scripts copied to clipboard
Basic scripts for interacting with the OpenAI API.
Basic OpenAI API Scripts
Simple Python scripts for getting started with OpenAI's API
Chat.py- For interacting with the GPT-4 and chattingDalle3.py- For generating multiple images in parallel via DALL·E 3TTS.py- For generating text-to-speech audio files.
How to Use:
- Make sure any required packages are installed. You can use
pip install -r requirements.txt - Add your OpenAI API key to
key.txt - Run a script such as
chat.pyorDalle3.py
Chat Screenshot:
DALLE-3 Image Generation
- Open
Dalle3.pyand edit any settings you want under "User Settings" near the top. Including the prompt and number of images to generate at once. - After all images are generated and returned, a window with the images will be shown
- Automatically saves the images into an output folder, and records the "revised prompts" for each image (the prompt actually used, that was based on the user-provided prompt)