GPT Action doesn't work and make my database go to 100% cpu usage

Hello guys, I hope someone can help me here.
I have an endpoint answering flawlessly using curl or postman.

I tried to integrate that endpoint through an action using exactly the same parameters and it just gives me
It looks like there was an issue retrieving the courses. Let’s try again.
I’m still encountering issues retrieving the courses. I’ll try one more time.
It seems there is a persistent issue with retrieving the courses. I apologize for the inconvenience.

And to make the problem even worse, after some attempts, my database goes crazy on cpu usage for some mysterious reason, this doesn’t happen using postman ever, only when I try to make the gpt action to work.

This is my instructions:

I want you to use the GetCourses action to search Courses/Routes/Tracks/Runs and list using topics. 
The following information must be displayed in that exact order: title, ascent, hilly (should be called Hilliness), paved, distance total (should be called Distance and displayed in km with one decimal), location name, details (The title should be called details: and the link should be called See more details) and lastly preview.
Hilly must be a graduation like that, you can hide the number and show just the description: 0 - Flat, 1 - Slightly Hilly, 2 - Moderately Hilly, 3 - Hilly, 4 - Very Hilly, 5 - Extremely Hilly. 

When looking for a Course/Route/Track/Run near/around/at some place or address or postcode use the parameter near. 
When looking for a Course/Route/Track/Run based on distance or how experienced the user is (beginner, professional), use the min_distance and max_distance (in meters) parameter to evaluate that.
When looking for a Course/Route/Track/Run based on the elevation or how hilly they are, use the min_elevation and max_elevation parameters (in meters).
When looking for a Course/Route/Track/Run based on how paved they are, use the min_paved and max_paved (percentage 0 to 100) parameters.

This is my action:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Get courses data",
    "description": "Retrieves courses data.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://example.app"
    }
  ],
  "paths": {
    "/gpt_course": {
      "get": {
        "description": "Get courses data",
        "operationId": "GetCourses",
        "parameters": [
          {
            "name": "near",
            "in": "query",
            "description": "Search Courses near location",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_distance",
            "in": "query",
            "description": "Search Courses with minimum distance in meters",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_distance",
            "in": "query",
            "description": "Search Courses with maximum distance in meters",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_elevation",
            "in": "query",
            "description": "Search Courses with minimum elevation in meters",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_elevation",
            "in": "query",
            "description": "Search Courses with maximum elevation in meters",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_paved",
            "in": "query",
            "description": "Search Courses with minimum paved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_paved",
            "in": "query",
            "description": "Search Courses with maximum paved",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

Am I doing something wrong?
Am I missing something?
Thank you very much for any assitence.

In the builder interface, you should be able to see the call the model is making.

You should also be able to log the call coming into your endpoint.

Either of those should help you figure out what is going on.

1 Like

Having wasted my time making a gpt that can call a custom backend with openapi descriptors, i learned the hard way that unless you’re service is quite simple it wont work. Specifically any file push or pulls for files over a very small size will fail miserably. Doesn’t matter if it’s multipart mime or raw text. The api for actions has been broken literally since it’s inception and open ai doesn’t really care to fix it.

Well, after some digging and log analysis I found out a slow query on my endpoint causing the database to go crazy and also the gpt to close the connection due to timeout. Consider it closed on my end.

2 Likes