https://retellai.com/?utm_source=discord&utm_medium=seo logo
custom function unable to read dynamic variables a...
# ❓・bug-report
s
Hi Team, We are evaluating conversation flow for appointment booking and one of the use cases in there is to call custom function to fetch available slots. This is the payload; { "type": "object", "properties": { "endDate": { "type": "string", "description": "end date in YYYY-MM-DDTHH:MM:SSZ format" }, "startDate": { "type": "string", "description": "start date in YYYY-MM-DDTHH:MM:SSZ format" }, "applicationname": { "type": "string", "description": "name of the application. all characters in lower case without any spaces in between words" } }, "required": [ "endDate", "startDate", "applicationname" ] } endDate, startDate are dynamic variables set initially. I have set startDate with "2025-03-18 14:00:00" and endDate with "2025-03-30 14:00:00". But when this function executes, with Gpt40 model, it always takes some date from October 2023 (both start and end date) Can you please let me know what's wrong here?
s
Hi @swapnil_57104 It seems there may be an issue with how the dynamic variables are being processed. Ensure the date format strictly matches 'YYYY-MM-DDTHH:MM:SSZ' with the 'Z' indicating UTC time. Additionally, verify that the variables are correctly passed to the function without being overridden by a default value. If the issue persists, consider logging the payload sent to the model to identify discrepancies.