Skip to content

wasedatime/wasedatime-AI

Repository files navigation

wasedatime-AI

This is an example pet name generator app used in the OpenAI API quickstart tutorial. It uses the FastAPI web framework.

Setup

  1. If you don’t have Python installed, install it from here

  2. Clone this repository

  3. Navigate into the project directory

    $ cd openai-quickstart-fastapi
  4. Create a new virtual environment

    # Linux
    $ python -m venv venv
    $ . venv/bin/activate
    # Windows
    python -m venv venv
    venv\Scripts\activate
  5. Install the requirements

    $ pip install -r requirements.txt
  6. Make a copy of the example environment variables file

    # Linux
    $ cp .env.example .env
    # Windows
    xcopy .env.example .env
  7. Add your API key to the newly created .env file

  8. Run the app

    $ python app.py

    demo

You should now be able to access the app at http://localhost:5001!

This repogitory is based on the Flask code at openai-quickstart-python. For the full context behind Flask app, check out the Flask tutorial.

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published