langchainrb
langchainrb copied to clipboard
function calling with structured output using EasyTalk gem.
Define the JSON Schema inside a Ruby class using the EasyTalk gem. Then generate a function with the schema and pass it to the OpenAI's chat method via the tools argument. Run the call and expect valid JSON output.