chezar89
04/11/2025, 6:39 PMAI Evy
04/11/2025, 6:39 PMAI Evy
04/11/2025, 6:39 PMAI Evy
04/11/2025, 6:40 PM"type": "object" at the top level to avoid validation errors .
2. Make sure your prompt explicitly instructs when to invoke the custom function . For example:
When user provided the city name, please get the weather for that city by calling the `get_weather` function.
3. Verify that the arguments are properly structured in the args field of the request body [(2)]() . Custom functions in Retell always use POST method and send arguments within an 'args' object in the JSON payload .
4. For date-related parameters, ensure the date format matches exactly what's specified in your schema [(3)]() . If using dynamic variables, verify they are being properly passed to the function and not being overridden .
5. Within your tools/prompt, you should specify how to pass the parameters and instruct the agent to use the information mentioned by the customer [(4)]() .
If the issue persists after checking these points, you may want to verify the request payload being sent to your endpoint by logging it, as there could be discrepancies in how the parameters are being processed [(3)]() .AI Evy
04/11/2025, 6:40 PMchezar89
04/11/2025, 6:42 PMAI Evy
04/11/2025, 6:43 PMchezar89
04/11/2025, 6:43 PMAI Evy
04/11/2025, 6:43 PMAI Evy
04/11/2025, 6:43 PMAI Evy
04/11/2025, 6:43 PMX-Retell-Signature header to ensure the request is properly coming from Retell [(2)]() .
2. Monitor the function call results in your transcripts, as Retell has recently added function call tracking capabilities [(3)]() .
If the issue persists, you can:
1. Log the complete request body, not just the args, as the call object contains real-time transcript up to when the request is sent [(2)]() .
2. Check if the function timeout (default 2 minutes) is being reached, as requests will be retried up to 2 times if they fail .
For additional support or to report a potential bug, I recommend checking out [Contact Sales]() or [https://github.com/RetellAI/]().
Would you like me to provide a general answer about function calling implementation?AI Evy
04/11/2025, 6:43 PMAI Evy
04/11/2025, 6:46 PMchezar89
04/11/2025, 10:42 PMAI Evy
04/11/2025, 10:42 PMAI Evy
04/11/2025, 10:42 PMAI Evy
04/11/2025, 10:42 PM"type": "object" en el nivel superior [(1)]()
2. Para verificar que la solicitud está llegando correctamente desde Retell, debes revisar el encabezado X-Retell-Signature [(2)]()
3. Los argumentos se envían en el cuerpo de la solicitud bajo la propiedad args [(2)]() [(3)]()
Aquí tienes un ejemplo de schema validado:
javascript
{
"type": "object",
"properties": {
"fecha_entrada": {
"type": "string",
"description": "La fecha de check-in."
},
"fecha_salida": {
"type": "string",
"description": "La fecha de check-out."
}
},
"required": [
"fecha_entrada",
"fecha_salida"
]
}
[(4)]()
También asegúrate de:
1. Incluir instrucciones explícitas en el prompt sobre cuándo invocar la función
2. Verificar que la respuesta tenga un código de estado entre 200-299 [(2)]()
Si el problema persiste después de estos ajustes, ¿te gustaría que te proporcionara una respuesta general sobre la implementación de funciones personalizadas?AI Evy
04/11/2025, 10:42 PMchezar89
04/11/2025, 10:59 PMAI Evy
04/11/2025, 10:59 PMAI Evy
04/11/2025, 11:00 PMAI Evy
04/11/2025, 11:00 PMjavascript
{
"type": "object",
"properties": {
"name": "test_final_fechas_simple",
"description": "TEST FINAL: Extrae check-in y check-out si el usuario los dice claramente con año.",
"function": {
"type": "object",
"properties": {
"fecha_entrada": {
"type": "string",
"description": "La fecha de check-in en formato YYYY-MM-DD."
},
"fecha_salida": {
"type": "string",
"description": "La fecha de check-out en formato YYYY-MM-DD."
}
},
"required": [
"fecha_entrada",
"fecha_salida"
]
}
}
}
[(1)]() [(2)]()
Key changes made:
1. Added "type": "object" at the root level
2. Structured the function definition under a function property
3. Added format specification in the description
4. Maintained the required fields array
When this function is called, Retell will send a POST request to your endpoint with the arguments in the args object of the request body [(3)]() . Make sure your webhook endpoint is configured to handle POST requests, as Retell custom functions always use POST method .
Would you like me to provide additional details about how to handle the response or verify the requests?AI Evy
04/11/2025, 11:00 PM