https://retellai.com/?utm_source=discord&utm_medium=seo logo
Error adding Custom Function
# ❓・bug-report
b
So I have the following API :
Copy code
j@j ~ % curl "https://byjonathanleung-getcityweather.web.val.run/weather?city=London"

{"city":"London","temperature":8.1,"condition":"Partly cloudy"}%
It's unclear to me how to specify the necessary URL params for the custom function. In the UI. I've tried doing but that doesn't work either. I've read through https://docs.retellai.com/retell-llm/add-tool-calling#define-parameters-for-custom-tool I think the UI is just not clear enough?
Cc @Zexia - Retell AI
Oh I realize I probably should cc @eviewang_
e
@NJ could you help to check it and give me some advice?
sorry i am not very technical.
b
For context, I'm a full stack engineer and IMO there is a clear UI / UX thing that I can't figure this out. I love your product so far and would love for it to be clearer to users : )
The fact that I can't figure this out even after looking at the docs is frustrating
And also in your UI, it's called "Functions" but in your docs it's called "Tool Calling"
Also in your demo, the calendar appointments don't work out of the box so that's a bit dissapointing.
e
here's one video for calendar function:

https://www.youtube.com/watch?v=b59o1YCcvjc&t=2s▾

b
Mm, i mean like the demo agent that is created for me when I signup doesn't work out of the box which is frustrating. It keeps saying "error". If you're going to put a demo that tries to query Cal.com it shouldn't require me doing anything for the demo to work.
e
That's a great point... Because we didnot put a workable APIkey on the template.
b
You could even put a FAKE json response and use a custom function instead of the actual cal.com, just like respond with a static json object that always works.
n
Hey @byjonathanleung I think the reason for confusion is because its not mentioned explicitly that the custom tools/functions will only accept POST API requests. So all the params are only supported in your body and NOT in path variables or query params. Apart from that the JSON schema is just the json schema representation of your API Body. (You can use any tool to get a json schema - https://transform.tools/json-to-json-schema)
Now I understand you might want to hit a GET API, but currently thats not supported, for now you might have to just write a wrapper POST API around this (weather API) Also the Custom Function/Tool call sends the request in a particular json format (call, name, args etc...), so your API request body signature has to adapt to that to be used a custom tool/function
I hope this clarifies it, else let me know 🙂
Also much appreciated feedback on the clarity of docs and UI around this. Will definitely consider that🫡
j
Hi Evy, in this video you don’t actually prompt “check_calendar function”. Is the way you have it in the video the best way to prompt calendar?
e
less prompt is better. in simple use case, it does not require to write each step that clear