2 ms·
> This article brushes it off but the actual user implementation of function selection is a pain in the ass (and also passing structured input data) that can't
by TeMPOraL 3y ago
> This article brushes it off but the actual user implementation of function selection is a pain in the ass (and also passing structured input data) that can't easily be explained in a tutorial, and like using LangChain it increases the information asymmetry for people getting into modern AI.
Stupid question, but... can't you just feed the relevant bit of API docs to GPT-4 and kindly ask it to write you the user-side call dispatcher, complete with error handling? :).
- minimaxir 3y agoUnfortunately, ChatGPT's cutoff date is still October 2021.
- TeMPOraL 3y agoWhy would it matter, though? The problem definition is literally "this is JSON response I'm getting: {JSON example from OpenAI docs}; write me code in {preferred programming language} that dispatches function calls based on it; ensure there's error handling in case input doesn't match this format or isn't even a valid JSON in the first place". Perhaps combined with: "here is a bunch of function declarations: {taken from OpenAI example}; here is a corresponding JSON schema {also taken from OpenAI example}; based on this example, please write me a JSON schema for the following function declarations {actual functions you want to provide}." That is, the problem doesn't rely on anything that's less than 5-8 years old (or more, I don't remember how old the JSON as we know it is).