Why does this tools call not work?
# support
s
{ "results": [ { "toolCallId": "call_Vlp8BYLAXJwrIjQleqR6Spci", "result": "There are 10 properties available for rent. The apartment at 123 Main St, Downtown Brooklyn has 1 rooms. It costs $1200 a month and is 500 square feet with a 6 month(s) lease term. The building amenities are ['Wi-Fi', 'Laundry']. The apartment at 456 Bedford Ave, Williamsburg has 2 rooms. It costs $2500 a month and is 900 square feet with a 12 month(s) lease term. The building amenities are ['Gym', 'Parking']. The apartment at 789 Knickerbocker Ave, Bushwick has 3 rooms. It costs $3000 a month and is 1100 square feet with a -1 month(s) lease term. The building amenities are ['Wi-Fi', 'Garden']. The apartment at 321 Eastern Pkwy, Crown Heights has 1 rooms. It costs $1000 a month and is 450 square feet with a 6 month(s) lease term. The building amenities are ['Wi-Fi', 'Shared Kitchen']. The apartment at 654 Prospect Park West, Park Slope has 2 rooms. It costs $2200 a month and is 800 square feet with a 12 month(s) lease term. The building amenities are ['Gym', 'Parking', 'Laundry']. The apartment at 987 Manhattan Ave, Greenpoint has 1 rooms. It costs $1300 a month and is 500 square feet with a 6 month(s) lease term. The building amenities are ['Wi-Fi']. The apartment at 159 Nostrand Ave, Bedford-Stuyvesant has 3 rooms. It costs $2800 a month and is 1200 square feet with a -1 month(s) lease term. The building amenities are ['Wi-Fi', 'Garden', 'Gym']. The apartment at 753 Flatbush Ave, Flatbush has 1 rooms. It costs $1100 a month and is 450 square feet with a 6 month(s) lease term. The building amenities are ['Wi-Fi', 'Shared Kitchen']. ", } ] }
I am able to returna succesful 200 response with that data, and I had it working before but I'm trying to make the language used by the AI more natural so I've updated the result. Vapi AI gets the result but then says they have gotten an error when in fact they haven't. The property defined in vapi is called Properties.
v
@Stephen Thank you for providing the apartment listings. If you have any questions or need further assistance with these properties, feel free to ask!
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
e
Hi, I have the same issue, I verified that my backend send the response as { "results": [{"toolCallId": call_id, "result": "some text"}] } However once I see logs the structure differs, e.g. see in call_id = b6eefc9d-7035-40a8-91b1-051bef507aa2, it doesn't show it as a list The agent says that there is no info, please fix that
s
Facing the same issue. @User any update regarding this?
s
@sambalicious0123 I have replied to your please check it over there.
@Stephen You have to return the result as a single paragraph of text without any line breaks.
expected
Copy code
{
    "results": [
        {
            "toolCallId": "call_Vlp8BYLAXJwrIjQleqR6Spci",
            "result": "There are 10 properties available for rent. The apartment at 123 Main St, Downtown Brooklyn has 1 rooms. It costs $1200 a month and is 500 square feet with a 6 month(s) lease term. The building,....,h has 1 rooms. It costs $1100 a month and is 450 square feet with a 6 month(s) lease term. The building amenities are ['Wi-Fi', 'Shared Kitchen'].",
        }
    ]
}
Do let me know if you require further help!!
@eR6 You have to return the response without any line-breaks.