Share a gist of validating the JSON schema of functions

It’s kind of annoying to debug function schema errors in the editors. I implemented the JSON schema validator for functions used in function calls. With the monaco-editor module and json-schema Draft-2020-12. Tedious work :smiling_face_with_tear:. And it’s open sourced in this gist.

If you are supporting editing functions or handling function schema errors in your products/editors. I hope this gist helps.

So now you can see the schema errors before submitting the functions.


I copy the function documentation from the site into ChatGPT and then ask it to create the function call for my chosen task, I don’t think I have ever manually created a json schema.


That’s a smart solution! That also reminds me that maybe I can add a new create functions magically to the product. Got a lot of user feedbacks complaining about the function schema errors. :see_no_evil:

1 Like