Class: Twilio::REST::Intelligence::V3::OperatorList::LanguageOperator

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v3/operator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ LanguageOperator

Returns a new instance of LanguageOperator.



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 35

def initialize(payload)
        @id = payload["id"]
        @display_name = payload["display_name"]
        @description = payload["description"]
        @version = payload["version"]
        @author = payload["author"]
        @prompt = payload["prompt"]
        @output_format = payload["output_format"]
        @output_schema = payload["output_schema"]
        @training_examples = payload["training_examples"]
        @context = payload["context"]
        @parameters = payload["parameters"]
end

Instance Attribute Details

#authorObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def author
  @author
end

#contextObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def context
  @context
end

#descriptionObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def description
  @description
end

#display_nameObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def display_name
  @display_name
end

#idObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def id
  @id
end

#output_formatObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def output_format
  @output_format
end

#output_schemaObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def output_schema
  @output_schema
end

#parametersObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def parameters
  @parameters
end

#promptObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def prompt
  @prompt
end

#training_examplesObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def training_examples
  @training_examples
end

#versionObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator. Assigned by Twilio (TTID).

  • : (display_name)
    String

    Display name of the Language Operator describing its purpose.

  • : (description)
    String

    Description of the Language Operator further explaining its purpose.

  • : (version)
    String

    Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.

  • : (author)
    “OperatorInstance.OperatorAuthor”
  • : (prompt)
    String

    The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the ‘href="param_name">parameters.}` syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (`author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their prompts omitted from the API.

  • : (output_format)
    OperatorOutputFormat
  • : (output_schema)
    Hash

    Required for ‘JSON` output only. this will be set to a JSON Schema object describing the properties & data types of the response. Please see platform.openai.com/docs/guides/structured-outputs#supported-schemas Will include the following keywords: - `type` : Must be set to `object` - `properties`: An object containing the property names and their data types you would like the LLM to return Additional details on JSON output formatting: - The root level `type` of a JSON schema must be set to `object` - The following property data types are supported : `string`, `number`, `boolean`, `integer`, `object`, `array`, `anyOf` - Definitions with `$defs` / `$ref` are supported - Max 100 object properties and 10 levels of nesting are supported - Max 1000 enum values across all enum properties are supported - Notable JSON Schema keywords not supported include: - For `strings`: `minLength`, `maxLength` - For `objects`: `patternProperties`, `unevaluatedProperties`, `propertyNames`, `minProperties`, `maxProperties` - For `arrays`: `unevaluatedItems`, `contains`, `minContains`, `maxContains`, `uniqueItems` - Structured Operator Results will be returned in the same order as the ordering of keys in the schema - In the event an Operator execution request is refused for safety reasons the Operator Result API response will include a new field called `refusal` to indicate that the LLM refused to fulfill the request - Twilio will automatically set `additionalProperties` to false and specify all provided fields as required (constraints of Structured Outputs). You don’t need to pass these fields as part of your JSON schema. Twilio will automatically overwrite any user-provided values for these fields.

  • : (training_examples)
    Array<OperatorList.OperatorTrainingExample>

    An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model’s understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (‘author` = `SELF`). Twilio-authored Operators (`author` = `TWILIO`) will have their training examples omitted from the API.

  • : (context)
    OperatorList.OperatorContext
  • : (parameters)
    Hash<String, OperatorParameter>

    Defines the schema of the parameters that are provided when running the operator, including required and optional values that determine the operator’s behavior. The values of the parameters themselves are passed in by the attached Intelligence Configuration.



34
35
36
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 34

def version
  @version
end

Instance Method Details

#to_json(options = {}) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/twilio-ruby/rest/intelligence/v3/operator.rb', line 48

def to_json(options = {})
{
        "id": @id,
        "displayName": @display_name,
        "description": @description,
        "version": @version,
        "author": @author,
        "prompt": @prompt,
        "outputFormat": @output_format,
        "outputSchema": @output_schema,
        "trainingExamples": @training_examples,
        "context": @context,
        "parameters": @parameters,
}.to_json(options)
end