Kevin Whinnery
banner
kevin.mn
Kevin Whinnery
@kevin.mn
Developer Experience @ OpenAI. Previously DevRel for Twilio, Deno, Retool.

https://www.kevin.mn/
Thanksgiving break mode engaged for middle teenager.
November 27, 2024 at 8:09 PM
4️⃣ Finally, make another call to the model containing the previous prompts and messages we sent, plus the function call message sent by the model after the first request, and our response.

Now the model can generate a response for the user!
November 27, 2024 at 4:14 PM
3️⃣ In this case, the model correctly decides it should call the "generate_horoscope" function. Instead of a text response, the model returns a message containing a JSON string of data that should be passed in to a function call in your code.
November 27, 2024 at 4:14 PM
2️⃣ Generate output from the model based on a prompt. Depending on the content of the prompt, the model may decide to call a function that you provide to it.
November 27, 2024 at 4:14 PM
1️⃣ Define a list of functions the model could decide to call based on a prompt. We provide only one function that expects an astrological sign in an input object.
November 27, 2024 at 4:14 PM
Simple (but complete) walkthrough of function calling in the OpenAI API in four acts. If you haven't tried it before, this is how you connect OAI models to external data or systems. Link to full code at the end of the 🧵
November 27, 2024 at 4:14 PM
By convention I always post the doggo first on a new social platform ☁️
November 15, 2024 at 2:47 PM