[SOLVED] Unknown issue from chatGpt plugin in calling my API endpoint with optional params

I have an API endpoint in my plugin API which accepts 1 required parma and 3 optional params.

When chatGPT is calling this endpoint without any optional params it seems to work as expected, but when it uses any optional params it is breaking with the below error. There was no error in the network tab, I only see this in the browser console.

From my debugging, it seems that there was no call to my API endpoint, so it is not an error from my API. (I even tested my API directly to reproduce this error but not successful)

Steps to reproduce

  1. Install the plugin Developer Doc Search
  2. The sequence of prompts that can trigger the error
  • I want to get readme docs from the below GitHub. Can you get it for me, please?
    github url: https://github.com/firebase/firebase-js-sdk
  • can you check if there are any other docs in this GitHub repo?
  • Do you see any other folder where we can find more docs?
  1. Error occurs at the third prompt and it is just stuck here with the loading state.

The reason might not be due to optional params. I do have optional params in my other endpoints, they do work as expected. :thinking:

I think I fixed it. (At least hoping it was fixed since I can’t reproduce the error now)

This is the issue and fix. I had defined my params as optional but also included a default value of the params. This seems to be conflicting at openAI so removing the Optional key on the param type fixed it from me.

1 Like

Nice. Thanks for coming back to let us know. Happy coding.