Tool_calls together with normal message.content

Is it possible to have them both in single response? For example a user asks your bot something and bot is sending notification to some real human person as a tool call and tells the user in normal textual reply that he is asking human. Can it be achieved in single chat.completions.create call?

You can create a parameter in the function called assistant_response or similar and tell it on the prompt to put the answer there

1 Like

Sure. You can write a function where the description specifically describes the necessity for writing an initial message to the user about the intention to use the function, and then proceeding automatically to using the function after that.

By doing so, you will receive both “content”, a response to be displayed, and tool_calls, a function call output.

Then…it is up to the user to stick around to see if a human actually comes on the line after invocation of the tool and programming path of receiving that tool call you’ve written.

There is no need for a separate function field or to take different actions to display content meant for a user.


I can replicate this behavior reliably on demand, demonstrating on the playground solely by the quality of my function. API code should always be expecting this possibility:

1 Like