Expedia plugin - UnrecognizedKwargsError: departure_time

Why is this error keep on coming even if I already told it my departure time?

Using Expedia

UnrecognizedKwargsError: departure_time

1 Like

Most of the first gen plug-ins were poorly written. It’s an alpha, I guess it should be expected.

1 Like

I bumped into this once for my plugin, too, and I know for a fact that my plugin does not throw this error.

My guess: this is a leaked exception from ChatGPT’s plugin call initiator.

My wild imagination: ChatGPT does two things under the hood -

  1. when the plugin is installed, it generates a client function based on the plugin’s OpenAPI.yaml, using an old-fashioned library.
  2. when user submits a prompt, it generates the function call kwargs based on the prompt and the yaml, using a language model (this might be why ChatGPT calls the plugin’s /.well-known/openapi.yaml every time)

#1 is deterministic but #2 is not. Occasionally, ChatGPT hallucinates and generates an extra param. When the unwanted param gets passed into the client function, it triggers the exception.

I might be way off base here :sweat_smile: @logankilpatrick thoughts?

1 Like

Calling the Shopify API also is a little buggy… for max_items it sends a number, and then Shopify expects a string instead. And the OpenAI corrects itself and resends the API request, which is super cool IMO.

This way of interaction with the APIs is game-changing.

1 Like

I believe in your second theory. Also, I can’t find a explanation on how ChatGPT plugins work internally. Did I miss an article of this? I know how to build a plugin, but I want to know the process behind installing and calling that plugin.

Not sure if they published it anywhere. Anyone’s guess at this point :smiley:

1 Like

Did you figure this out? If so can you update this post with details for others that follow.

My best guess on this without seeing the details of your plugin and debug messages is that ChatGPT is generating data to pass to the ChatGPT plugin but that data is in the wrong format, as noted specifically for departure_time. The word UnrecognizedKwargsError suggest that JSON is involved and that the data being sent is not properly formatted as expected JSON, or that JSON is being sent and JSON is not expected.

I also know that with OpenAPI that date and date-time can be passed as string with and optional format modider line in the OpenAPI,


Scroll down to String Formats section.

Note: I have not used this yet.

Based on my experience this is 99% a problem with the openAPI schema. I have had the same error before, and solved it by fixing my schema.