Big OpenAI update! We just got Functions in GPT-3.5 and 4. Let's upgrade Concierge in 20 minutes (before I have to give a talk at Echelon 2023), and look at a real example of Function calling in action.
Compared to old Concierge, there are a few positives (and negatives!)👇
One big plus is that we get solid JSON. In my runs, old Concierge needed JSON-fixing about 10% of the time, but Functions was never off on the JSON.
One big loss (due to the use of JSONSchema) is that jsonSchema descriptions don't seem to be respected.
openai.com/blog/function-calling-and-other-api-updates
The problem is that we can't add additional metadata about our fields. If you look at the example, you'll see that original Concierge extracted and converted the date to ISOString, and the airports to IATA Codes.
Second is that we don't know how these are counted into the tokens yet - maybe I'm missing something. For now we're just stringifying the function and adding it in manually.
One thing that's awesome is that the library on Typescript works, day one. It's a small change to the input, but it's really appreciated.
What is not is that Playground (platform.openai.com/playground?mode=chat) hasn't been updated. Then again, it still thinks gpt-4 has a limit of 2048.
One more complex example before I head off. Email drafting start is one of our more complex commands, and Functions seems to do an equivalently good job here.
Overall, super happy with the new update, I'll be adding more functionality soon. Follow if you're interested!