Integrate OpenAI APIs into FastAPI applications for easier consumption using Swagger UI, feel free to use and modify.
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.
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
- Activate virtual environment
poetry shell
- Install dependencies
poetry install
- Setup your env file that is under
envs
directory- duplicate
dev.example.env
file inenvs
directory and rename itdev.env
- Sign up to openai website and get free API token and paste it in
OPENAI_API_KEY
as value
- duplicate
- Run FastAPI app
OR use make command
python -m app
make run
- @rashmin - Idea & Initial work