GPT Builder for SQL database

My setup: a local Windows 11 Pro machine, where I have installed the SQL Server and the database., along with Flask (tried also to generate SSL certificate for it, in order to serve ‘https’ instead of ‘http’ as requested by GPT Builder). Tried a different setup with Ngroke, but cancelled since it’s complicating the environment without merit for now.(ngroke agents become unavailable without any alert, with the free version I’ve tested).

My problem: can not create an Action to insert data into the sql database due the error below.

Import from url: https://127.0.0.1:5002/openapi.yaml
*tried also to add the code directly to the Schema, see below.
** if opening the link in browser, I can see the content (since Flask is running), but page is displayed as non-secure, meaning without https.

Error :
None of the provided servers is under the root origin https://127.0.0.1
In components section, schemas subsection is not an object
Server URL https://127.0.0.1:5002 is not under the root origin https://127.0.0.1; ignoring it

Schema:
openapi: 3.1.0
info:
title: Invoice Data API
version: 1.0.0
servers:

  • url: https://127.0.0.1:5002
    paths:
    /insert-invoice-data:
    post:
    summary: Insert extracted invoice data into the database
    operationId: insertInvoiceData
    requestBody:
    required: true
    content:
    application/json:
    schema:
    type: object
    properties:
    invoice_number:
    type: string
    date:
    type: string
    total_amount:
    type: number
    vendor_details:
    type: string
    items:
    type: array
    items:
    type: object
    properties:
    description:
    type: string
    quantity:
    type: integer
    price:
    type: number
    responses:
    “200”:
    description: Invoice data inserted successfully
    “500”:
    description: Internal server error
    components:
    securitySchemes:
    ApiKeyAuth:
    type: apiKey
    in: header
    name: x-api-key
    security:
  • ApiKeyAuth:

Hi!

You’re calling 127.0.0.1.

It’s like you order something from amazon, and it asks for you address, you just write “at home, second floor”. So the package leaves the amazon warehouse and gets delivered back to the amazon warehouse, because that’s where it lived. And the amazon warehouse doesn’t have a second floor so it throws an error.

I’m trying to diggest your example… but still can not figure out how to setup my environment to make this custom gpt to work.

You need an actual server with an actual public IP address. 127.0.0.1 just means “connect to myself”. When the OpenAI calls 127.0.0.1 it’s trying to connect to itself, and not to your computer.

While you can open your own computer up to the internet, that’s pretty risky, especially if you don’t know what you’re doing.

You’ll probably want to rent a small virtual machine from a cloud vendor, install your DB there, and connect to that.

Or use some serverless stuff like firebase or supabase or heroku or something.

I’m not endorsing any of these products btw. use at your own risk

Introduced Ngrok in the game, and it seems to work.
That error dissapeared indeed, but got the ClientResponseError which I can not be fixed at all. It seems to be related to the fact that Builder sends data to Flask, but Flask can not be found, despite the fact that it is active.