Welcome to the OpenAI API Explorer repository!
Note : This is still a WIP repository, Don't forget to star ⭐ and follow this repository for new notebooks every week!
This repository attempts to become a gateway to mastering the OpenAI APIs for natural language processing and artificial intelligence tasks. This is a work-in-progress bootcamp designed to provide you with the knowledge and skills you need to harness the full potential of the OpenAI models through their APIs.
Through this repository, we will use available OpenAI models to explore -
- Large Language Models like GPT 3.5
- Multimodal Models like GPT 4
- Text Embeddings Models and their application
- Image generation diffusion models like DALL-E
- Text to Speech Models
- Audio to Text Models like Whisper
Through these models, we will attempt to understand concepts of -
- Prompt Engineering
- Supervised Fine Tuning (SFT)
- Retrieval Augmented Generation (RAG)
- AI Agents (OpenAI Assitants API)
... and more
Before you begin, make sure you have the following:
-
An OpenAI API key: To access the OpenAI API, sign up for an API on www.openai.com
You can also refer to the Day 0 Notebook for steps to create an OpenAI account and get an API key. OpenAI charges for the API calls. However, you receive credits from OpenAI for the first time sign up. For the purpose of the code here, the credits will be more than enough.
-
Python: Ensure that Python >=3.10.0 is installed on your system and that you can create a virtual environment for a safer and cleaner project setup.
-
Jupyter Notebooks: Install Jupyter Notebooks using Anaconda or pip
-
Clone this repository to your local machine:
git clone https://github.com/your-username/openai-api-bootcamp.git
-
Navigate to the cloned repository:
cd openai-api-bootcamp
-
It's recommended to use a virtual environment to avoid conflicts with other projects or system-wide Python packages.
Run the following command to create a virtual environment named venv (you can name it anything you like):
python3 -m venv ./venv
Activate the Virtual Environment:
-
On Windows, activate the virtual environment by running:
venv\Scripts\activate.bat
-
On macOS and Linux, activate it with:
source venv/bin/activate
-
-
Install required Python packages:
pip install -r requirements.txt
-
Store your OpenAI API key in a .env file in the Notebooks folder:
OPENAI_API_KEY=<YOUR API KEY> ### You can also look at the Notebooks\example_dot_env file in this repo for the structure. Remeber to rename to .env
/Notebooks/
[Released : 28/APR/2024]
- Installing the OpenAI python library
- Creating an OpenAI account
- Getting an API key
- Setting up OpenAI Client
- Making the first API Call
[Released : 28/APR/2024]
- Introduction to LLMs
- Understanding the available OpenAI LLMs
- Looking at the OpenAI Chat Messages (Prompt) Structure
- Studying Chat Completions API Parameters
- Decoding the Chat Completions Response Object
- Learning how to Stream responses
- Looking at JSON Response format
- Understanding Reproducibility
- Learning about managing Tokens
[To be Released : 05/MAY/2024]
- What is a prompt?
- Writing Simple Prompts
- Writing Clear Instructions
- Zero/One/Few Shot Learning
- Prompt Management
[To be Released : TBD]
- Brief Introduction to Embeddings
- Embeddings API
- Text Search with Embeddings
- Clustering with Embeddings
[To be Released : TBD]
To be Released : TBD]
[To be Released : TBD]
[To be Decided]
[To be Decided]
Data : Data for the notebooks can be found in the Assets/Data directory.
Images : All explainer images used in the notebooks are stored in the Assets/Images directory.
If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request. Contributions from the community are highly encouraged and appreciated!
I'm also eager to hear back from you to guide this bootcamp. Please email me your suggestions at [email protected]
This repository is licensed under the MIT LICENSE. See the LICENSE file for details.
Hi! I'm Abhinav, a data science and AI professional with over 15 years in the industry. Passionate about AI advancements, I constantly explore emerging technologies to push the boundaries and create positive impacts in the world. Let’s build the future, together!
Connect with me!
You can also book a time-slot with me
Also, read my ebooks for more on Generative AI!