v1.2.0 - Support for chat with functions
OpenAI allows sending a list of function declarations that the LLM can decide to call based on the prompt. The function calling interface must be used with chat completions and the gpt-4-0613
or gpt-3.5-turbo-0613
models or later.
This update supports providing a function schema to the initialization of the chat session object.
The function result is then detected when parsing the response from a chat message.
See https://github.com/leafo/lua-openai/blob/main/examples/example5.lua or the README for a complete example.