Member-only story
A Step-by-Step Guide on building Generative AI APIs using FastAPI, GPT and Google Cloud Platform (Part 1/2)
In the past several months, generative artificial intelligence has made significant strides in natural language processing, computer vision, and the creative arts. With the advent of ChatGPT and Stable Diffusion, we are witnessing a new era of AI technology that is capable of generating human-like text responses and photorealistic images — all from simple text prompts. In this article, we will demonstrate how we can build and serve a generative AI use case using FastAPI.
The main purpose of this article is to introduce and show FastAPI features, we may dedicate another article to deep dive the generative AI topic. We will start by presenting FastAPI and how it works, then we will introduce our generative AI use case and how to implement it using OpenAI models and finally we will package and serve our model using FastAPI. Let’s start 🚀 !
1. FastAPI
As Python grows in popularity, the variety of high-quality frameworks available to developers has blossomed. In addition to steadfast options like Django and Flask, there are many new options including FastAPI.