soc86
07/21/2024, 9:27 AMVapi
07/21/2024, 9:28 AMVapi
07/21/2024, 9:28 AMcondition property should not exist within the messages section of your data structure.
To resolve this issue, you should remove the conditions array from the messages object. The conditions property is not expected to be part of the messages object based on the schema you've provided.
Here's how you can adjust your $data array:
php
$data=[
"assistant"=>[
// ... other properties ...
"model"=>[
"model"=>"gpt-4o",
"provider"=>"openai",
"semanticCachingEnabled"=>true,
"tools"=>[
[
"type"=>"voicemail"
]
],
"messages"=>[
[
"role"=>"system",
"content"=>$prompt
// Removed the conditions array from here
]
]
],
// ... other properties ...
],
"customer"=>[
"number"=>$telephone,
"name"=>$name
],
"maxDurationSeconds"=>600,
"phoneNumber"=>[
"assistantId"=>"#####",
"name"=>"####",
"twilioAccountSid"=>"#####",
"twilioAuthToken"=>"#####",
"twilioPhoneNumber"=>$tel
],
"type"=>"outboundPhoneCall"
];
Make sure to remove the conditions array entirely from the messages object. If you need to apply conditions for message delivery or call routing, you should refer to the correct section of the API documentation where conditions are applicable.
If you need further assistance with the correct structure or if you have any other questions, please let me know!Vapi
07/21/2024, 9:28 AMVapi
07/21/2024, 9:29 AMShubham Bajaj
07/22/2024, 6:41 PMShubham Bajaj
07/22/2024, 6:41 PM