Skip to content

RashminDungrani/openai-apis-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI APIs with FastAPI application

Status GitHub Pull Requests License


Integrate OpenAI APIs into FastAPI applications for easier consumption using Swagger UI, feel free to use and modify.

📝 Table of Contents

🧐 About

This project involves integrating OpenAI APIs into FastAPI applications to facilitate calling them using the Swagger UI. FastAPI is a modern Python web framework for building APIs quickly and efficiently. By leveraging FastAPI's features and integrating OpenAI's APIs, developers can build applications with powerful AI capabilities such as language translation, sentiment analysis, text summarization, question-answering, and more. The project may involve designing and implementing RESTful API endpoints that interact with the OpenAI APIs, configuring authentication and security measures, and documenting the APIs for consumption using the Swagger UI.

🏁 Getting Started

Prerequisites

To work on a FastAPI project, you'll need to ensure that your environment is set up with the following prerequisites:

  • Python 3.10 or higher installed
  • Poetry package manager installed

Installation

  1. Activate virtual environment
    poetry shell
  2. Install dependencies
    poetry install
  3. Setup your env file that is under envs directory
    • duplicate dev.example.env file in envs directory and rename it dev.env
    • Sign up to openai website and get free API token and paste it in OPENAI_API_KEY as value
  4. Run FastAPI app
    python -m app
    OR use make command
    make run

✍️ Authors

📄 Screenshot

OpenAI APIs - Swagger UI

Show some 💗 and star the repo to support the project