Comment by minimaxir

2 years ago

ChatGPT's June update added support for "function calling", which in practice is structured data I/O marketed very poorly: https://openai.com/blog/function-calling-and-other-api-updat...

Here's an example of using structured data for better output control, lightly leveraging my Python package to reduce LoC: https://github.com/minimaxir/simpleaichat/blob/main/examples...

How has your experience with function calls been? We tried doing code generation and making ChatGPT generate diffs and it seems to perform worse than the March edition.

  • It’s hit or miss - 8/10 it will do what I ask it to do, but a lot of times even the JSON output is not parseable so you definitely need to add retry logic for that in your product.