Create Squad Potential Bug
# support
b
Greetings! Looking for some support on an error I'm getting for CREATE Squad API call. Attached is the screen shot. Summary: - Using persistant assistant, so opting for "assistantId" instead of "assistant" key. - Guidance states "This is the assistant that will be used for the call. To use an existing assistant, use assistantId instead", but I'm getting this error message stating "assistant" is required. Am I overlooking something or is this a server-side bug? Thank you! https://cdn.discordapp.com/attachments/1342171458524414012/1342171458864156687/image.png?ex=67b8aa14&is=67b75894&hm=76a1061720cf4a710dc2a30a5602cc6af487c68774d724b0ab54167eb45ffd04&
Update I tried adding this key;value pair to each destination: "type": "assistant", Creation of the squad worked. But I can't initiate "Talk with" on the Dashboard Squad GUI, as this error arises (image attached) https://cdn.discordapp.com/attachments/1342171458524414012/1342284032968228966/image.png?ex=67b912eb&is=67b7c16b&hm=ea30f3bce35287683e330e829d7ed8f2aad9a26fc55694e866d65a928b408600&
(In addition to the remaining ones that do look correct, but just arent functional)
v
Hey Billiam, could you share the squadId so I can take a look?
b
Hey Shubham, thanks for reaching out. here it is: c0e5b217-c2ea-42de-945c-4c995e797c24
s
The initial error you encountered was resolved by adding "type": "assistant" to the destinations, which is correct according to the interface definition. The error you're seeing when trying to use the squad likely stems from how the squad members are structured. I notice your last member is empty:
Copy code
json
{
  "members": [
    // ... other valid members ...
    {}  // This empty member is problematic
  ]
}
This empty member object at the end of your squad members array should be removed. According to the validation rules. Each member in the squad must be properly structured with either an
assistantId
or
assistant
property. Ensure all assistantDestinations reference valid assistant names that exist in your organization. Here's how the end of your members array should look:
Copy code
json
{
  "members": [
    // ... other members ...
    {
      "assistantId": "2de71f0b-f9a2-4d47-ba49-61d80781c4b8",
      "assistantDestinations": [
        // ... your destinations ...
      ]
    }
  ],
  "name": "Yoga Studio Front Desk vAssistant",
  "membersOverrides": {
    "firstMessageMode": "assistant-speaks-first-with-model-generated-message"
  }
}
This should resolve both the creation and "Talk with" functionality issues you're experiencing.
b
Makes sense. thank you
much appreciated