Variations for request start tool message
# support
s
Is there a way to set variations for the tool start message? Like instead of just having one phrase, it can randomly choose from different variations? I tried updating the tool through the API, and now the tool JSON looks like this:
Copy code
"messages": [
      {
        "type": "request-start",
        "contents": [
          {
            "type": "text",
            "text": "wait",
            "language": "en"
          },
          {
            "type": "text",
            "text": "testing",
            "language": "en"
          },
          {
            "type": "text",
            "text": "working",
            "language": "en"
          }
        ]
      }
    ]
But when I tried calling my assistant again to use the tool it just kept saying the wait phrase.
a
The issue is that you're only providing the contents array without the required content field. The tool message system supports both content and contents fields, where: content - A single string message contents - An array of language-specific variations Here's the correct way to structure your tool message for variations:
Copy code
{
  "type": "request-start",
  "contents": [
    {
      "type": "text",
      "text": "wait",
      "language": "en"
    },
    {
      "type": "text",
      "text": "testing",
      "language": "en"
    },
    {
      "type": "text",
      "text": "working",
      "language": "en"
    }
  ],
  "blocking": false
}