Few-shot and function calling

And furthermore, conversation history can have even more context and logic when it includes the AI’s answer based on that function.

{
"role": "user",
"content": "Post a tweet for me 'AI can affect the outside world!'"
},
{
"role": "function",
"name": "twitter_post",
"content": "Twitter API: message to xxx user account success"
},
{
"role": "assistant",
"content": "It's posted, the world should be able to see your message."
},
 {
"role": "user",
"content": "Help with math. What is sin(333)?"
},
{
"role": "function",
"name": "wolfram_alpha",
"content": "-0.00882 rad"
},
{
"role": "assistant",
"content": "In radians, the answer to sin(333) is -0.00882."
},

That will prevent situations where it could loop asking the same function call countless times or doesn’t know how well it answered. It also will be able to then build on the context of its prior answers in formulating new responses asking about them.