/travels-flask-azoai-api

A Simple Python Flask API to Interact with Azure Open AI

Primary LanguagePythonMIT LicenseMIT

Gimmicks Travels - Flask Azure Open AI api

A Simple Python Flask API to Interact with Azure Open AI

Executing the API

python app.py           # On Windows
$env:FLASK_APP = "app"
$env:FLASK_ENV = "development"
flask run

Few Commands to get started

pip install virtualenv
python.exe -m pip install --upgrade pip
python -m venv .venv
.venv/Scripts/activate
pip freeze
deactivate

pip install Flask python-dotenv openai
pip freeze > ./requirements.txt

pip install -r ./requirements.txt

Steps to create the API

  1. Create a new folder
  2. Create an .env file and Environment Variables
  3. Create a virtual environment
  4. Install pip install Flask python-dotenv openai and other dependencies
  5. pip freeze > requirements.txt
  6. Create a app.py file