Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 2.45 KB

README.md

File metadata and controls

65 lines (45 loc) · 2.45 KB

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