OpenAI functions: How to use GPT API functions in JavaScript by Josh Sanger
Now, if our AI feels like using a function (i.e., if wantsToUseFunction is `true`), we can check which function it’s calling. We can do this by checking the object function_call that is returned by the API in its message. It will contain the name as a string and the arguments it wants to pass to […]