Model speaks tool call instead of executing it
# support
t
We have a use case where the model speaks the internal VAPI tool call code instead of executing it in c.a. 20% of cases. We are using a redirect tool call to redirect caller to different target numbers. Numbers and details truncated to spare space:
Copy code
json
{
  "function": {
    "name": "transfer_call",
    "description": "...",
    "parameters": {
      "type": "object",
      "properties": {
        "destination": {
          "description": "...",
          "type": "string",
          "enum": [
            "xxxxxx",
            ...
          ]
        }
      },
      "required": [
        "destination"
      ]
    }
  },
  "async": false,
  "destinations": [
    {
      "type": "number",
      "number": "xxxxxx",
      "message": "...",
      "description": "...",
      "numberE164CheckEnabled": false
    },
    ...
  ]
}
In the log for such an issue we receive following output:
Copy code
15:04:23:886
[LOG]
Model output: Moment

15:04:23:901
[LOG]
Model output: bitte

15:04:23:916
[LOG]
Model output: .

15:04:23:929
[LOG]
Model output:
15:04:23:945 [LOG] Model output: functions 15:04:23:968 [LOG] Model output: .transfer 15:04:23:974 [LOG] Model output: _call 15:04:24:019 [LOG] Model output: ({ 15:04:24:032 [LOG] Model output: destination 15:04:24:048 [LOG] Model output: : 15:04:24:061 [LOG] Model output: "+ 15:04:24:062 [LOG] Voice input: Einen Moment bitte. functions.transfercall({ destination: 15:04:24:085 [LOG] Model output: xxx 15:04:24:091 [LOG] Model output: xxx 15:04:24:108 [LOG] Model output: xxx 15:04:24:125 [LOG] Model output: xxx 15:04:24:136 [LOG] Model output: " 15:04:24:153 [LOG] Model output: }) 15:04:24:166 [LOG] Model output:
Copy code
15:04:24:198
[LOG]
Model request cost (attempt #1, $0.011095, 1955 prompt, 88 completion)

15:04:24:199
[CHECKPOINT]
Model sent end token
Is this a bug on VAPI side or is this something we can resolve? Thanks Tobias
v
@Tobias Hello Tobias, It seems like the issue you're experiencing is related to the model interpreting the tool call as part of the spoken output rather than executing the command. This could be due to how the model is being invoked or an issue with the model's understanding of the context in which the tool call should be executed. To resolve this, please ensure that the model is provided with clear context that the
transfer_call
function is meant to be executed and not spoken. This might involve adjusting the way the model is triggered or providing additional context that differentiates between spoken output and command execution. If the issue persists despite these adjustments, it may be a bug on the VAPI side. In that case, please reach out to the VAPI support team with detailed information about the issue, including the logs you've provided, so they can investigate further. For now, if you need to execute the
transfer_call
function, please provide the destination number, and I will assist you with that. Best regards, VAPI Support Bot
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
t
We already specifically tell them to use and call the tool with the destination number (referencing it by
transfer_call
).
Hi do I need to do something else to get help?
Hi, can someone help on this please? 🙂
m
@Tobias Were you ever able to resolve this? Having the same issue
k
Hello Tobias, sorry that this ticket has flown under the radar. Please create a new ticket and we'll get this taken care of ASAP. Mindofman feel free to create one as well
2 Views