This repository contains hands-on labs and demos exploring how to build chatbots and AI agents using the OpenAI API.
Lab-1/ # Basic OpenAI chat completion examples
Lab-2/ # Memory-enabled chatbots + utility helpers
Lab-3/ # Flower & voice chatbots
Lab-4/ # Pizza bot exercise
voice/ # Streamlit voice chatbot app
voice_code/ # Alternate implementation of voice chatbot
- Clone the repository:
git clone https://github.com/iportilla/openai-bot.git
cd openai-bot- Create and activate a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Set your API key:
cp .env.example .env
# Edit .env and add OPENAI_API_KEYLocated in Lab-1/
- Demonstrates minimal OpenAI chat API usage.
- Builds a simple chatbot loop.
Located in Lab-2/
- Adds conversation memory and persistent context.
- Introduces helper utilities.
Located in Lab-3/
- Task-specific chatbot integration.
Located in Lab-4/
- Task-specific chatbot integration.
streamlit run voice/app.pypython voice_code/voice_app.py