danemyers
11/13/2024, 8:12 PMVapi
11/13/2024, 8:15 PMproperties
field in your tool call, it's used to define the structure and expected data for the parameters that you need to send when calling the tool. The properties
field itself is not returned in the response; instead, it's there to guide you in constructing your request correctly.
In your case, when you call the competitorprice2
function, you should include the userResponse
property in the parameters of your HTTP request. Here's an example of how you might structure your request:
json
{
"userResponse": "The customer mentioned they might go with a competitor due to better pricing."
}
When your server processes this request, it should use the value of userResponse
to perform the necessary evaluation and then return a response that includes the results of that evaluation. The response should be in the following format:
json
{
"results": [
{
"toolCallId": "unique_identifier_for_this_call",
"result": "The evaluation of the user's response against the benchmark."
}
]
}
The result
field in the response will contain the information you're looking for, which is the evaluation of the user's response. If you're not seeing this in the response, you'll need to ensure that your server is correctly processing the userResponse
parameter and including the evaluation in the result
field of the JSON response.
If you need further documentation or assistance with how to structure your server's response, please ask support for more info on this.Vapi
11/13/2024, 8:15 PMVapi
11/13/2024, 8:17 PMdanemyers
11/13/2024, 8:17 PMdanemyers
11/14/2024, 10:42 AM