Use function only in last message

At the time of writing, there was no mechanism documented of how one would tell the AI in conversation history what it had produced before to call a function.

Now there is an API method which I explain - still hiding the actual language the AI uses to call a function.

You will see in that post that you are sending the same chat history and user question as before, but also adding the function call the AI used and the return value from the function to the end of your new messages input.

3 Likes