Skip to content

AI-enabled schema generation #35

Description

@siliconlad

Using the power of GPT-4 (or other models), generate schemas for functions.

There are two possible flavours:

  1. 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.
  2. 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.

  1. 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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions