Plugin for public transport using GTFS data - questions


I am researching the plugins topic and playing with plugin to help answer public transport related questions (timetables, connections, etc.). I am using data provided by the public transport companies in GTFS format.

I managed to achieve first successful responses for queries that requires multiple requests to my API

While creating the plugin, several questions arose that I did not find answers to in the documentation or community:

  1. How can I force OpenAI to refetch openapi.yaml? Now I am uninstalling and adding my plugin again. Is there any easier way to do it?

  2. Initially, I created an endpoint that can return departure times for any line with the option of parameterizing the departure time. Unfortunately, in the case of questions “about the next tram”, openAI cannot complete it with the current time. My idea is to code it myself in the api, so that you can provide information like “now” or “5 minutes from now”. Is this the only possibility?

  3. To specify the “time” parameter of my route of the string type, I added the format field to my openapi.yaml file scheme:

      type: string
      format: time

Unfortunately, it was ignored by OpenAI and it filled it with the “now” value. I fixed the issue by providing format in field description: Format HH:MM:SS . Did I do something wrong or is the format field unsupported?

  1. I have an endpoint that takes a route ID as a parameter which is a string. Unfortunately, sometimes OpenAI tries to put other texts there, e.g. the name of the stop. Is there any possibility to specify in the openapi.yaml file that this parameter is a reference to an ID from another schema?

Thank you!

Already got answer for the first issue in another topic: What are the top 3 pain points for plugin developers? - #24 by EricGT

It’s possible to force re-fetching plugin configuration using the Plugin devtools feature.

1 Like

Since the file openapi.yaml is an OpenAPI specification have you seen the String Formats section?

Note: I have not used this part of the specification with a ChatGPT plugin but is where I would go for more possibilities.

I described my experience in a blog post: I wrote an OpenAI plugin that tells me when to leave for the next tram

My plugin is also available on github: (node.js, typescript, express.js)