#extra function call data?

1 messages · Page 1 of 1 (latest)

pliant garnet
#

I want to bundle pertinent data with the tools JSON object for function calls, can this be done or will it reduce the ability of the model to determine functions and parameters?

blissful nicheBOT
#

Hi @pliant garnet. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information provided in the extracts, it's not recommended to add extra data to the tools JSON object when making function calls. In one of the forum posts (https://community.openai.com/t/597830), a support user advised not to pass the tools when replying with the response of the function call. Instead, the correct way to append the function call response to the end of messages to be passed to the model was provided:

messages.push({
        tool_call_id: toolCall.id,
        role: "tool",
        name: functionName,
        content: functionResponse,
      }); // extend conversation with function response

Adding extra data to the tools JSON object could potentially confuse the model and reduce its ability to correctly determine functions and parameters. It's best to follow the recommended structure for function calls to ensure optimal performance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: