Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.63 KB

readme.md

File metadata and controls

56 lines (38 loc) · 1.63 KB

OpenAI API Workshop - HackUMass 2024

Welcome to the Introduction to OpenAI Developer Platform workshop! This repository contains starter code for various OpenAI API implementations.

Getting Started

  1. Get your OpenAI API key here
  2. Check out the workshop slides here
  3. Clone this repository to get started with the demo code

Repository Contents

This repository includes several demo files to help you get started with different OpenAI APIs:

  • gpt-demo.py: Starter code for GPT-4o implementation
  • dalle-demo.py: Example implementation of DALL-E 3 image generation
  • tts-whisper-demos.py: Text-to-Speech demonstration using OpenAI's TTS, then transcribed back into text!
  • embeddings-demo.py: Vector embeddings example using OpenAI's embedding models

Prerequisites

  • Python 3.7+
  • OpenAI API key
  • openai Python package

Installation

# Clone the repository
git clone [repository-url]

# Install required packages
pip install openai

Usage

  1. Add your API key to a .env file:
OPENAI_API_KEY='your-api-key'
  1. Run any demo file:
python gpt-demo.py

Resources

Workshop Info

This workshop was presented at HackUMass 2024. For questions or support, please reach out to Niko Lorantos.