pipeline-error-openai-llm-failed when using proper...
# support
p
My function call always throws the above error when using an array in any of the properties. It does not even attempt to call the server URL. However, if I only use strings it works fine. Could it be because vapi doesn't handle the specific array type? (i.e. array of strings, array of objects, etc) https://cdn.discordapp.com/attachments/1239917517229523035/1239917517410140160/image.png?ex=6644aaac&is=6643592c&hm=9db0b8d9d94d873ff45d7bff53e13f4bc22fdd1b50393b6c2f171e635bae5c0a& https://cdn.discordapp.com/attachments/1239917517229523035/1239917517644894319/image.png?ex=6644aaac&is=6643592c&hm=9037150b4d29dde729d1f2d6240b78f60fdee976584f06475d04781d164696c3&
v
Hi @Prince, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Function Calling]() * [List Calls]() * [Server Events]() * [Tools Calling]() -----------------------------
### Answer The error
pipeline-error-azure-openai-llm-failed
may be related to the specific way properties are defined in your function call. Vapi supports custom functions with parameters, including arrays, but it's crucial to ensure the schema is properly defined and matches the expected format. Here's an example of how to define a custom function with an array parameter:
Copy code
json
{
    "functions": [
        {
            "name": "exampleFunction",
            "description": "A function that takes an array of strings.",
            "parameters": {
                "type": "object",
                "properties": {
                    "arrayParameter": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    ]
}
[(1)]() , [(2)]() Ensure that your function schema correctly specifies the type and structure of the array. Also, you may want to verify the request payload against the schema to ensure compliance. If the error persists, it may be related to a bug or an implementation detail specific to the Vapi pipeline. For further assistance, you might need to verify the correct implementation details or any updates from Vapi related to handling arrays.
s
call_id pls
4 Views