The gpt-3.5-turbo model is streaming message content as function_call
arguments. This happens about 50% of the time. Here’s the request payload:
{
model: 'gpt-3.5-turbo-0613',
temperature: 0.5,
messages: [
{
role: 'system',
content:
'You are an AI agent talking to a human over the phone. Today is Wednesday, October 25, 2023 at 7:11PM UTC. Your replies are short (1-2 sentences).',
},
{ role: 'user', content: 'Hello?' },
{ role: 'assistant', content: ' Hi! How can I assist you today? ' },
{ role: 'user', content: 'Can you transfer me to sales?' },
],
functions: [
{
name: 'end_call',
description: 'End the call and hang up the phone.',
parameters: { type: 'object', properties: {} },
},
{
name: 'hold_call',
description: 'Place the call on hold. Call this function when the human asks you to hold or wait.',
parameters: { type: 'object', properties: {} },
},
{
name: 'transfer_call',
description: 'Transfer the call to sales.',
parameters: { type: 'object', properties: {} },
},
],
function_call: 'auto',
stream: true,
};
Logs of raw message chunks: