This flow is how you can provide a model external data to use for generations, or allow a model to control any external system programmatically. Here's the full example I just showed, usable in Node or @deno.land:
This flow is how you can provide a model external data to use for generations, or allow a model to control any external system programmatically. Here's the full example I just showed, usable in Node or @deno.land:
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
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!
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
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.
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
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.
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
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.