ok, I haven’t done the streaming thing, sorry can’t help there, but this is the gist of what I do in the function call def:
{
"name": "reply_text_and_call_function",
"description": "",
"parameters": {
"type": "object",
"properties": {
"reply_to_user": {
"type": "string",
"description": "What you want to say to the user",
},
"param1_for_funtion": {
"type": "string",
"description": "First parameter for function you are calling",
},
"param2_for_funtion": {
"type": "string",
"description": "Second parameter for function you are calling",
},
},
"required": ["reply_to_user","param1_for_funtion","param2_for_funtion" ],
},
},
The GPT returns the function call, and I run the function and then update the user in a separate chat thread object that I maintain. I don’t pass the input twice, I just wait for the user to repond and then call the GPT again. Hope that helps @amaan.gokrani