yaro_30421
08/27/2025, 1:32 PMAI Evy
08/27/2025, 1:32 PMAI Evy
08/27/2025, 1:33 PMjson
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "User's name from the conversation"
},
"age": {
"type": "number",
"description": "User's age mentioned in the call"
}
},
"required": ["name", "age"]
}
2. The LLM processes user speech and calls your function:
When your endpoint receives the request, the user's spoken information is automatically extracted and passed in the args field [(3) ]() [(2) ]() :
javascript
// Request body structure
{
"name": "get_user_details",
"call": { /* call object with transcript */ },
"args": {
"name": "John Doe",
"age": 26
}
}
[(3) ]() , [(2) ]()
3. Access the extracted information in your endpoint: [(3) ]() [(2) ]()
javascript
this.app.post("/check-weather", async (req, res) => {
const content = req.body;
if (content.args.city === "New York") {
return res.json("25f and sunny") ;
} else {
return res.json("20f and cloudy") ;
}
}) ;AI Evy
08/27/2025, 1:33 PMAI Evy
08/27/2025, 1:33 PMyaro_30421
08/27/2025, 1:33 PMyaro_30421
08/27/2025, 1:34 PMAI Evy
08/27/2025, 1:34 PMAI Evy
08/27/2025, 1:34 PMjson
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}
Important troubleshooting note: If you failed to save the custom function, it is likely because the parameters are not valid [(1) ]() [(2) ]() . One common mistake is not adding "type": "object", to the top level of the JSON schema .
The parameters you define here will be automatically populated by the LLM based on what the user says during the conversation, and sent to your endpoint in the args field of the request body .AI Evy
08/27/2025, 1:34 PMAI Evy
08/27/2025, 1:34 PMyaro_30421
09/01/2025, 11:30 AMAI Evy
09/01/2025, 11:30 AMAI Evy
09/01/2025, 11:30 AMjson
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}
The key point is that parameter definition is only available for POST, PATCH and PUT requests . If you're using GET or DELETE methods, you won't see the parameter definition option.
Make sure you:
1. Select POST, PATCH, or PUT as your HTTP method
2. Include "type": "object", at the top level of your JSON schema (common mistake that prevents saving)AI Evy
09/01/2025, 11:30 AMAI Evy
09/01/2025, 11:30 AM