5 Projects to Learn How to Work With GPT APIs

If you are here, you've probably already understood that AI has revolutionized the way we interact with technology and will continue to do so in the future. You've probably also realized that learning to work with powerful language models like GPT (Generative Pre-trained Transformer) is crucial to stay relevant and use AI to your advantage.

In this blog post, I have listed three exciting projects that offer an excellent opportunity for anyone interested in learning how to work with the GPT API. Whether you're a developer looking to enhance your skills or a curious individual eager to dive into the world of the GPT model, these projects will provide valuable hands-on experience in harnessing the power of GPT and to understand its basics.

As always, a basic understanding of programming concepts and familiarity with APIs would be beneficial. However, even if you're new to programming, don't worry. These projects are designed to be beginner-friendly, offering step-by-step guidance while they also explain how to install the pre-required tools that you need to interact with the API.

Let's go!

Integrating OpenAI GPT3 with a database

This video tutorial covers two topics. First, Adrian explains how to use the YouTube API and Single Store to create a database that's able to retrieve comments from youtube. OpenAI's GPT is then used to determine whether comments should be responded to or not.

Adrian also walks through the process of creating an async function, a for loop, and an update query to the database.

Setting up a AutoGPT Project

This video tutorial provides step-by-step instructions on how to set up an Auto GPT project, which seems to be the latest hype in the AI world. To explain it lightly, Auto GPT is a powerful tool that can bridge the gap between chat GPT and the internet to provide more relevant and recent information. It also has the ability to follow up on prompts until tasks are complete.

The video also explains the benefits of Auto GPT, which include the ability to integrate with different APIs, translate videos, and output imagery. The tutorial also encourages viewers to experiment with the software and suggests a variety of uses for it, such as a personal assistant or to emulate one's voice.

No steps are left out in the tutorial which makes it very easy to follow and end up with a fully functioning AutoGPT project. Amongst other things, Mike explains how to navigate to the Auto GPT folder and its readme file, install the requirements listed in the requirements.txt file, and to configure Auto GPT by adding OpenAI API keys. Billing and usage is also briefly explained which can be quite important as AutoGPT projects can run on indefinitely if not manually stopped.

Creating your own chatbot with the GPT API

This video tutorial explains how to create three different custom ChatGPT-powered chatbots using Python and VS Code. It covers the necessary steps to install Python and the OpenAI package, as well as how to use the API key to link the ChatGPT language model to the app.

All three chatbots that are presented are simple and easy for beginners to create. While the first one simply showcases how to ask a question to chatGPT in the IDE, the last chatbot is built on your own front-end which gives you comprehensive insights into how you would go about building your own chatbot.

Understanding how to use Langchain with GPT

In the above tutorial, you'll learn to conceptualize what langchain is and understand why its a useful tool to interact with GPT models through their APIs.

Langchain is an open source framework that allows developers working with AI to combine large language models such as GPT-4 with external sources of computation and data.

The video walks you through three major concepts that makes up Langchain:

  1. Components: This includes prompt templates, indexes and LLM wrappers which essentially helps you to interact with the large language models more efficiently.
  2. Chains: A way to create multiple steps when interacting with GPT and having a defined chain which carries out sequential steps dependent on the answer it receives back from the initial prompt.
  3. Agents: Allows you to create applications in which the "agent" itself connects to external APIs or tools in order to complete a task. Essentially this gives the application you are building more flexibility as you don't need to define a predetermined chain. Instead, the agent will itself create the chain by looking for ways to solve the task at hand.

Build a Doc Search using GPT and Embeddings

This video explains how to use Supabase, Postgres and embeddings to create a natural language processing model that can respond to queries about Supabase with relevant information from their documentation.

You'll learn how to generate embedding vectors for pieces of text and store them in a database using the pgvector extension for Postgres. The video also walks you through how to use OpenAI's library to call the completion endpoint, set the temperature of the response in order to get a consistent answer.

In short, the tutorial walks you through three steps:

1. Pre-processing the knowledge database.

2. Store the data (embeddings) in a database

3. Inject content into the GPT model as a prompt.

Although the video does not walk you through all of the details of the project, the project is available as a GitHub project and the tutorial does give excellent explanations as to how the Doc search works as well as background information on embeddings, vectors and postgres.

Hopefully that gave you some insights into the transformative potential of AI-powered language models like GPT in various applications. If it sparked any ideas of your own, you might have enough understanding to start messing around with your own projects that takes use of the GPT API.

One thing to note however, is that OpenAI regularly releases updates and improvements to their models and APIs, so staying updated with their documentation and developer community will ensure you remain up to date and can get the most out of any application you might want to build. Each new model such as text-davinci-003 or gpt-3.5-turbo comes with different capabilities, tokens and training data, thus reviewing their models will allow you to create great apps over time.

Mikael Shams
Mikael Shams


Writing about technology, business and everything in between.