carlo_98907
10/01/2025, 4:33 PMAI Evy
10/01/2025, 4:33 PMAI Evy
10/01/2025, 4:33 PMAI Evy
10/01/2025, 4:33 PMAI Evy
10/01/2025, 4:33 PMcarlo_98907
10/01/2025, 4:51 PMAI Evy
10/01/2025, 4:51 PMAI Evy
10/01/2025, 4:51 PMAI Evy
10/01/2025, 4:51 PMAI Evy
10/01/2025, 4:51 PMAI Evy
10/01/2025, 5:04 PMcarlo_98907
10/01/2025, 5:04 PMAI Evy
10/01/2025, 5:04 PMAI Evy
10/01/2025, 5:04 PMjavascript
export interface FunctionCall {
id: string;
funcName: string;
arguments: Record<string, any>;
result?: string;
}
private PrepareFunctions() : ChatCompletionsFunctionToolDefinition[] {
let functions: ChatCompletionsFunctionToolDefinition[] = [{
type: "function",
function: {
name: "end_call",
description: "End the call only when user explicitly requests it.",
parameters: {
type: "object",
properties: {
message: {
type: "string",
description: "The message you will say before ending the call with the customer.",
},
},
required: ["message"],
},
},
}];
return functions;
}
The community has reported similar issues where agents vocalize function calls instead of executing them [(2) ]() . One suggested workaround is adding to your response guidelines: "When calling a tool / function, DO NOT mix the tool name in your response" .
For the WebSocket implementation, you need to handle the end_call properly by setting end_call: true in your response event [(3) ]() .
Would you like a general answer based on my knowledge instead?AI Evy
10/01/2025, 5:04 PM