cannot interract with server and parse answer usin...
# support
p
I manage to send request to server using the tool, as json server replies with good answer contained in valid json with result key. the vocal assistant starts to read python code.
it's not clear to me whats expected from server, shall it delegate raw output interpretation to the nlp or return a formatted message for it to say?
v
@paul gaston It sounds like you've successfully sent a request to the server and received a valid JSON response with a result key. If you want the voice assistant to read the Python code aloud, you'll need to ensure that the text-to-speech functionality is properly configured to interpret and vocalize the code. If you need assistance with setting up the voice assistant to read the Python code, could you please provide more details on the current setup or the specific functionality you're looking to implement?
You can continue this conversation by mentioning me in the message.
p
i don't want it to read python code, just say the answer, for now it says the result is not valid.
I'm using blocs: bloc 1 is conversation bloc 2 is tool with api call (for some reason it apepars that it's not properly working as i cannot see the logs in webhook) when using json params instead of complex url scheme with params in it. bloc 3 i assume shoudl be able to read from variable result but doesn't. on the server side i see the post has a lot of useless data inside it, i'm wondering what's the purpose of it.
the sole fact the call isn't displayed in the webhook section of the dashbaord bugs me a little bit now, i'll investigate or revert url scheme..
For teh record, everything seems to work flawlessly with postman and everything is in production ..
maybe i need help with the assistant setup once this is solved
I think i identified the issue, brb later with more data
I'm confused, postman works when i provide the exact same request body the block does but when using it in a block i dont see outgoing webhook..
my server returns 200ok with the appropriate payload
i think i found the error, you don't systematically sanitize parameters case in the body. come are camel cased some are not.
depending on the context: when you show body logs there are not camel cased but when you actually send a request tehy are.
see.. in logs: {"message":{"timestamp":1731086052606,"type":"tool-calls","tool_calls":[.... in production: {"message"=>{"timestamp"=>1731086116285, "type"=>"tool-calls", "toolCalls"=>[...
see the difference? that very error prone tbh
can you confirm the response from my server is ok? I see logs now in webhook: {"calendar_uuid":"6405c787-cb3b-4407-bf20-a777d6269f1b","available_slots":["2024-11-08 09:00:00","2024-11-08 10:00:00","2024-11-08 11:00:00","2024-11-08 12:00:00","2024-11-08 13:00:00","2024-11-08 14:00:00","2024-11-08 15:00:00","2024-11-08 16:00:00","2024-11-09 09:00:00","2024-11-09 10:00:00","2024-11-09 11:00:00","2024-11-09 12:00:00","2024-11-09 13:00:00","2024-11-09 14:00:00","2024-11-09 15:00:00","2024-11-09 16:00:00","2024-11-10 09:00:00","2024-11-10 10:00:00","2024-11-10 11:00:00","2024-11-10 12:00:00","2024-11-10 13:00:00","2024-11-10 14:00:00","2024-11-10 15:00:00","2024-11-10 16:00:00","2024-11-11 09:00:00","2024-11-11 10:00:00","2024-11-11 11:00:00","2024-11-11 12:00:00","2024-11-11 13:00:00","2024-11-11 14:00:00","2024-11-11 15:00:00","2024-11-11 16:00:00","2024-11-12 09:00:00","2024-11-12 10:00:00","2024-11-12 11:00:00","2024-11-12 12:00:00","2024-11-12 13:00:00","2024-11-12 14:00:00","2024-11-12 15:00:00","2024-11-12 16:00:00","2024-11-13 09:00:00","2024-11-13 10:00:00","2024-11-13 11:00:00","2024-11-13 12:00:00","2024-11-13 13:00:00","2024-11-13 14:00:00","2024-11-13 15:00:00","2024-11-13 16:00:00","2024-11-14 09:00:00","2024-11-14 10:00:00","2024-11-14 11:00:00","2024-11-14 12:00:00","2024-11-14 13:00:00","2024-11-14 14:00:00","2024-11-14 15:00:00","2024-11-14 16:00:00","2024-11-15 09:00:00","2024-11-15 10:00:00","2024-11-15 11:00:00","2024-11-15 12:00:00","2024-11-15 13:00:00","2024-11-15 14:00:00","2024-11-15 15:00:00","2024-11-15 16:00:00"],"message":"slots trouvés mon grand poto de tes morts"} .
i think i need the result key, correct?
s
Hey @paul gaston you need to return the response in following format https://docs.vapi.ai/tools-calling#server-response-format-providing-results-and-context and ensure you teach the assistant how to use and cosnsume your tool call response.
Let me know how it goes.
p
thank you trying it now
ok, it works flawlessly, i missed that part, thank you.
5 Views