# Location GPT

To improve documentation read this:

https://www.linode.com/docs/guides/documenting-a-fastapi-app-with-openapi/

Start Uvicorn with the command line:
    
    uvicorn location:app --reload

Open in Browser:

    http://127.0.0.1:8000/location/zia

Install Ngrok:

https://ngrok.com/docs/getting-started/

Note:
We have started using this service instead of Ngrok:

https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/

Run the following command to add your authtoken to the default ngrok.yml:

    ngrok config add-authtoken 2bZGNZ3Mj3HdRxPt19defrHVOl_7oFHsvr5AmM9A9UZUyhFn

Deploy with your static domain:

    ngrok http --domain=my-static-domain.ngrok-free.app 8000

Open in Browser:

    https://my-static-domain.ngrok-free.app/location/zia

Open in Browser:

    https://my-static-domain.ngrok-free.app/location/zia

Open Docs in Browser:

    https://my-static-domain.ngrok-free.app/docs

Open OpenAPI specs in Browser:

    https://my-static-domain.ngrok-free.app/openapi.json

Now we will use this json to create GPT Action.

Now create a Custom GPT here:

    https://chat.openai.com/gpts

Add the following server url in the openapi.json file generated by FastAPI and paste it into action schema:

    "servers": [
        {
        "url": "https://my-static-domain.ngrok-free.app/"
        }
    ],


