Using the power of GPT-4 (or other models), generate schemas for functions.
There are two possible flavours:
- Take the function code and the constructed schema (without AI) and then pass it to GPT-4 to optimise the descriptions and type hints to ensure the best description of the function for the lowest number of tokens.
- Take the function code and fill in the descriptions and/or type hints automagically.
Would require the user to provide their own API key though.
There would also need to be a caching element, because you don't want to call GPT-4 every time.
- You could just call it once when the program is run. This will work fine if it is meant to be a long running program (like a web server or something). Not ideal for scripts and the like, especially if they're run often.
- You could physically cache them, and then has the function to check if the function has been updated before sending it off to GPT-4. Seems like the best option, but more involved.
Using the power of GPT-4 (or other models), generate schemas for functions.
There are two possible flavours:
Would require the user to provide their own API key though.
There would also need to be a caching element, because you don't want to call GPT-4 every time.