Kevin Whinnery @kevin.mn · 27/11/20244️⃣ 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! 100
Kevin Whinnery @kevin.mn · 27/11/20243️⃣ 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. 100
Kevin Whinnery @kevin.mn · 27/11/20242️⃣ 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. 100
Kevin Whinnery @kevin.mn · 27/11/20241️⃣ 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. 100
Kevin Whinnery @kevin.mn · 27/11/2024Simple (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 🧵 220
Kevin Whinnery @kevin.mn · 15/11/2024By convention I always post the doggo first on a new social platform ☁️ 130