rare-sapphire
rare-sapphire17mo ago

Need to know new tools calls response format.

Need to know new tools calls response format. Old one was {result:"result string"} Now I am using tools, What is the response format for that??? please help. I dont find it in vapi docs
2 Replies
Vapi
Vapi17mo ago
Relevant threads
These are relevant threads you might take a look into before continuing further: - <#1247553809102798889> - <#1243030604098834532> - <#1238077741903904828> - <#1242123278789906554> - <#1248279809256067174> - <#1247304346689994826> - <#1248276789508182076>
Vapi
Vapi17mo ago
@SajithSPY Certainly! The new response format for tool calls in VAPI has been updated to provide more structured information. When your server receives an HTTP request for a tool call and processes it, you should send back a response in the following JSON format:
{
"results": [
{
"toolCallId": "X",
"result": "Y"
}
]
}
{
"results": [
{
"toolCallId": "X",
"result": "Y"
}
]
}
In this format: - results is an array that can contain multiple result objects. - Each result object within the array has two properties: - toolCallId: This is a unique identifier for the tool call. - result: This is the result of the tool call, which can be a string or any other JSON-compatible data structure depending on the tool's output. This new format allows for better tracking and handling of multiple tool calls and their respective results. If you need further clarification or assistance, please don't hesitate to ask! You can continue this conversation by mentioning me in the message. @SajithSPY Sweet. Have a great day! @Vapi Sweet. Have a great day!

Did you find this page helpful?