Nothing is working properly in function calling
# support
m
Migrated to tools from function, and nothing is working
v
@Mayank Sharma I'm sorry to hear that you're experiencing issues after migrating to tools from functions. Let's try to troubleshoot the problem together. Could you please provide me with more details about the issues you're facing? For example, are you receiving any error messages, or is there a specific function that isn't working as expected?
You can continue this conversation by mentioning me in the message.
m
everything is broken nothing is working,we have wasted our 2 days figuring out the issue still nothig is working
s
m
Copy code
one function call is taking more than 20 sec then its directly saying we are unable to process {
  "results": [
    {
      "toolCallId": "call_VaJOd8ZeZgWCEHDYomyCPfwN",
      "result": "San Francisco's weather today is 62°C, partly cloudy."
    }
  ]
}
 and even we are return this it doesn't say anything
@Sahil
call_9fYQTsm7CoslOmW5qoERtDvz this is the tool call id
@Sahil can you check this asap
we sent the response and still it says, it failed to do the task
s
Can you send me the call_id? You can get that from Vapi -> Call Logs
m
sure
74656e42-43f8-491d-9b8f-611aedfa5742
@Sahil
@Sahil ? @Vapi ??
v
@Mayank Sharma I apologize for the inconvenience you're experiencing. It seems there might be an issue with the response time or the format of the response you're sending back. The call ID you've provided,
74656e42-43f8-491d-9b8f-611aedfa5742
, will be helpful for further investigation. To ensure that we're on the right track, please make sure that: 1. The response is in the correct JSON format as required by VAPI. 2. The function execution time is within the acceptable limits (typically under 20 seconds). If you've already checked these and the issue persists, I would recommend reaching out to VAPI support with the call ID for a more detailed investigation. They will be able to look into the logs and provide specific insights into what might be going wrong. If there's anything else I can assist you with, please let me know!
s
@Shubham Bajaj can you please check this issue?
s
@Mayank Sharma can you please share recent call id.
m
@Shubham Bajaj 917d4c78-37d9-4c1e-b3b4-a720bd5b5bbf
@Shubham Bajaj @Sahil ?
s
please check the call id, the call end reason is customer ended call. FYI: not related to tool call.
@Mayank Sharma please share the correct call id.
m
"call_bNiVq32tJNpN3gV7WFtPdqJW" @Shubham Bajaj
can you check this
@Sahil
s
@Mayank Sharma this is not the correct call id.
call id looks like this
provide us correct call_id then only we will be able to help you out.
I would suggest you to read this documentation https://docs.vapi.ai/tools-calling
m
@Sahil i shared call id from the function calling we were making
what other calling you want
Copy code
{
  "results": [
    {
      "toolCallId": "call_VaJOd8ZeZgWCEHDYomyCPfwN",
      "result": "San Francisco's weather today is 62°C, partly cloudy."
    }
  ]
}
do you want this ?
tool_call_id : "call_P5DxTxlcTMYpbdRv87QtuqdT"
@Sahil can we get on a call because we are blocked because of this, after you guys changed from function to tooling looks like everything is broken, even the delay timeout doesn't works
getting undefined in content
conversation array sequence are also changing continously
@Vapi
v
@Mayank Sharma I understand that you're facing multiple issues after the transition from functions to tools, including long function call times, incorrect call IDs, and unexpected behavior in conversation sequences. It seems there might be some confusion with the call IDs and the expected response format. To address these issues effectively, I recommend the following steps: 1. **Review the Documentation**: Ensure that you have thoroughly reviewed the [VAPI tools documentation](https://docs.vapi.ai/tools-calling) to understand the expected formats and requirements. 2. **Check Response Format**: Verify that the response you're sending back is in the correct JSON format as required by VAPI. 3. **Test with Sample Data**: Try testing your tool with sample data to ensure that it's functioning correctly within the expected time frame. 4. **Contact Support**: Since you're experiencing a blockage and the issues seem to be complex, it would be best to get in touch with VAPI support directly. They can provide a more in-depth analysis and assist you with a call if necessary. 5. **Provide Detailed Information**: When contacting support, provide them with all the relevant call IDs, error messages, and a detailed description of the issues you're encountering. I apologize for the inconvenience and understand the urgency of the situation. If you need further assistance or have more information to share, please let me know, and I'll do my best to help.
m
@Shubham Bajaj ?
Copy code
{
  "type": "conversation-update",
  "conversation": [
    {
      "role": "assistant",
      "content": "Hey. Good to see you again.\n\nI'm doing great."
    },
    {
      "role": "user",
      "content": "Hey. Hi. How are you?"
    }
  ],
  "messagesOpenAIFormatted": [
    {
      "role": "assistant",
      "content": "Hey. Good to see you again.\n\nI'm doing great."
    },
    {
      "role": "user",
      "content": "Hey. Hi. How are you?"
    }
  ]
}
the response structure of conversation is messed up now I am doing great should be after role :'user'
i think we should be getting free credits for this,earlier this was working and now its messed up
s
this not a call id
it is tool_call_id
we need call_id in order to debug it which you can call logs
m
@Sahil the conversation array i shared with you
can you check that
a8acac31-083a-4a25-bc7f-277f28bc01c3
@Sahil can we get on a call ?
s
Sent you the link. So, marking it as close for now.
m
ok
@Sahil is conversation fixed ?
@Shubham Bajaj
Copy code
content
: 
"No result returned."
role
: 
"tool"
tool_call_id
: 
"call_soLyQSopk6Lir8dwM9mSp0g1"
i always get this
Copy code
res.status(200).send({
      results: [{ toolCallId: id, result: 'Attaching image to canvas' }],
    });
above response structure
s
@Mayank Sharma share recent call id.
m
call_tdvRzMZu0wlWfhVzsZcYO97y
@Shubham Bajaj
s
this is toll call id not call id. go to vapi dashboard and copy call id from there.
m
shared
s
Your response format is not correct.
m
what should be response format ?
this function takes a while to complete the task
Copy code
res.status(200).send({
        results: [{ toolCallId: id, result: "Graph plotted successfully" }],
      });
this is what i sending to you
what else i need to send ?
@Shubham Bajaj
v
I'm also having a similar problem. The assistant doesn't understand the response from the tool. It always suggests that the tool returned success, even if i manually wrote it to return error, fail, incorrect etc. I have used the correct format for the response:
Copy code
{
  "results": [
    {
      "toolCallId": "call_VaJOd8ZeZgWCEHDYomyCPfwN",
      "result": "San Francisco's weather today is 62°C, partly cloudy."
    }
  ]
}
s
did you tried resolving tool call resquest timeout
your response format is correct but what you mention is separate thing. tool returned success means tool call was returned successfully late result is used by model to generate response.
5 Views