com.smartgwt.client.ai

## Class SummarizeValueRequest

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.core.RefDataClass
      - - com.smartgwt.client.util.AsyncOperationParams
        - - com.smartgwt.client.util.AsyncDataBoundOperationParams
          - - com.smartgwt.client.ai.DataBoundAIRequest
            - - com.smartgwt.client.ai.SummarizeValueRequest

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class SummarizeValueRequest
      extends DataBoundAIRequest

  Represents a request to AI to generate a summary of an individual value.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.RefDataClass

      `id`

    - ### Fields inherited from class com.smartgwt.client.core.DataClass

      `factoryCreated, factoryProperties`

    - ### Fields inherited from class com.smartgwt.client.core.JsObject

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SummarizeValueRequest()`
    `SummarizeValueRequest(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SingleSourceAIRequest` | `getAIRequest()` The natural language description of how to summarize the value, which may include a request for relevant supplemental information.
    `AIMessageSource` | `getAIRequestSource()` The source of the `aiRequest`.
    `DataBoundComponent` | `getComponent()` If specified, the `DataBoundComponent` displaying the `value`.
    `DataSource` | `getDataSource()` If specified, the `DataSource` where the `value` originated.
    `SummarizeValueExample[]` | `getExamples()` If specified, examples to provide to AI.
    `java.lang.String` | `getFieldName()` If specified, the name of the field containing the `value`.
    `static SummarizeValueRequest` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `Record` | `getRecord()` If specified, the `Record` containing the `value`.
    `java.lang.String[]` | `getRelevantFieldNames()` If specified, the names of the `DBCField`s of the `component` (or `DataSourceField`s of the `dataSource`) that are relevant to the request to summarize the `value`.
    `java.lang.Object` | `getValue()` The value to summarize.
    `AIContentType` | `getValueType()` The type of the `value`.
    `SummarizeValueRequest` | `setAIRequest(SingleSourceAIRequest aiRequest)` The natural language description of how to summarize the value, which may include a request for relevant supplemental information.
    `SummarizeValueRequest` | `setAIRequestSource(AIMessageSource aiRequestSource)` The source of the `aiRequest`.
    `SummarizeValueRequest` | `setComponent(DataBoundComponent component)` If specified, the `DataBoundComponent` displaying the `value`.
    `SummarizeValueRequest` | `setDataSource(DataSource dataSource)` If specified, the `DataSource` where the `value` originated.
    `SummarizeValueRequest` | `setExamples(SummarizeValueExample... examples)` If specified, examples to provide to AI.
    `SummarizeValueRequest` | `setFieldName(java.lang.String fieldName)` If specified, the name of the field containing the `value`.
    `SummarizeValueRequest` | `setRecord(Record record)` If specified, the `Record` containing the `value`.
    `SummarizeValueRequest` | `setRelevantFieldNames(java.lang.String... relevantFieldNames)` If specified, the names of the `DBCField`s of the `component` (or `DataSourceField`s of the `dataSource`) that are relevant to the request to summarize the `value`.
    `SummarizeValueRequest` | `setValue(java.lang.Object value)` The value to summarize.
    `SummarizeValueRequest` | `setValueType(AIContentType valueType)` The type of the `value`.

    - ### Methods inherited from class com.smartgwt.client.ai.DataBoundAIRequest

      `getExcludeFieldNames, getMaxRetries, setExcludeFieldNames, setMaxRetries`

    - ### Methods inherited from class com.smartgwt.client.util.AsyncOperationParams

      `getCancellationController, setCancellationController`

    - ### Methods inherited from class com.smartgwt.client.core.RefDataClass

      `getRef, getRef, internalSetID`

    - ### Methods inherited from class com.smartgwt.client.core.DataClass

      `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

    - ### Methods inherited from class com.smartgwt.client.core.JsObject

      `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SummarizeValueRequest

          public SummarizeValueRequest()

    - #### SummarizeValueRequest

          public SummarizeValueRequest(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static SummarizeValueRequest getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setAIRequest

          public SummarizeValueRequest setAIRequest(SingleSourceAIRequest aiRequest)

      The natural language description of how to summarize the value, which may include a request for relevant supplemental information.

      Note: For more consistently-formatted AI-generated summaries of values, it is often helpful to specify `examples` that include the desired output form.

      Parameters:
        `aiRequest` - New aiRequest value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getAIRequest

          public SingleSourceAIRequest getAIRequest()

      The natural language description of how to summarize the value, which may include a request for relevant supplemental information.

      Note: For more consistently-formatted AI-generated summaries of values, it is often helpful to specify `examples` that include the desired output form.

      Returns:
        Current aiRequest value. Default value is null

    - #### setAIRequestSource

          public SummarizeValueRequest setAIRequestSource(AIMessageSource aiRequestSource)

      The source of the `aiRequest`.
      Parameters:
        `aiRequestSource` - New aiRequestSource value. Default value is "system"
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getAIRequestSource

          public AIMessageSource getAIRequestSource()

      The source of the `aiRequest`.
      Returns:
        Current aiRequestSource value. Default value is "system"

    - #### setComponent

          public SummarizeValueRequest setComponent(DataBoundComponent component)

      If specified, the `DataBoundComponent` displaying the `value`.

      If `dataSource` is also specified, then the component should be bound to the same `DataSource` or a `DataSource` inheriting from it.

      Overrides:
        `setComponent` in class `AsyncDataBoundOperationParams`
      Parameters:
        `component` - New component value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getComponent

          public DataBoundComponent getComponent()

      If specified, the `DataBoundComponent` displaying the `value`.

      If `dataSource` is also specified, then the component should be bound to the same `DataSource` or a `DataSource` inheriting from it.

      Overrides:
        `getComponent` in class `AsyncDataBoundOperationParams`
      Returns:
        Current component value. Default value is null

    - #### setDataSource

          public SummarizeValueRequest setDataSource(DataSource dataSource)

      If specified, the `DataSource` where the `value` originated.

      If `component` is also specified, then the component should be bound to the same `DataSource` or a `DataSource` inheriting from it.

      Overrides:
        `setDataSource` in class `AsyncDataBoundOperationParams`
      Parameters:
        `dataSource` - New dataSource value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getDataSource

          public DataSource getDataSource()

      If specified, the `DataSource` where the `value` originated.

      If `component` is also specified, then the component should be bound to the same `DataSource` or a `DataSource` inheriting from it.

      Overrides:
        `getDataSource` in class `AsyncDataBoundOperationParams`
      Returns:
        Current dataSource value. Default value is null

    - #### setExamples

          public SummarizeValueRequest setExamples(SummarizeValueExample... examples)

      If specified, examples to provide to AI.

      Examples that include the desired output form often help to make the formatting of AI-generated summaries of values more consistent.

      Parameters:
        `examples` - New examples value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getExamples

          public SummarizeValueExample[] getExamples()

      If specified, examples to provide to AI.

      Examples that include the desired output form often help to make the formatting of AI-generated summaries of values more consistent.

      Returns:
        Current examples value. Default value is null

    - #### setFieldName

          public SummarizeValueRequest setFieldName(java.lang.String fieldName)

      If specified, the name of the field containing the `value`.
      Parameters:
        `fieldName` - New fieldName value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls
      See Also:
        `FieldName`

    - #### getFieldName

          public java.lang.String getFieldName()

      If specified, the name of the field containing the `value`.
      Returns:
        Current fieldName value. Default value is null
      See Also:
        `FieldName`

    - #### setRecord

          public SummarizeValueRequest setRecord(Record record)

      If specified, the `Record` containing the `value`.

      If supplying the record, then the `component` and/or `dataSource` must be specified as well.

      Parameters:
        `record` - New record value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getRecord

          public Record getRecord()

      If specified, the `Record` containing the `value`.

      If supplying the record, then the `component` and/or `dataSource` must be specified as well.

      Returns:
        Current record value. Default value is null

    - #### setRelevantFieldNames

          public SummarizeValueRequest setRelevantFieldNames(java.lang.String... relevantFieldNames)

      If specified, the names of the `DBCField`s of the `component` (or `DataSourceField`s of the `dataSource`) that are relevant to the request to summarize the `value`.
      Parameters:
        `relevantFieldNames` - New relevantFieldNames value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls
      See Also:
        `FieldName`

    - #### getRelevantFieldNames

          public java.lang.String[] getRelevantFieldNames()

      If specified, the names of the `DBCField`s of the `component` (or `DataSourceField`s of the `dataSource`) that are relevant to the request to summarize the `value`.
      Returns:
        Current relevantFieldNames value. Default value is null
      See Also:
        `FieldName`

    - #### setValue

          public SummarizeValueRequest setValue(java.lang.Object value)

      The value to summarize. Its type is specified by the `valueType`.
      Parameters:
        `value` - New value value. Default value is null
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getValue

          public java.lang.Object getValue()

      The value to summarize. Its type is specified by the `valueType`.
      Returns:
        Current value value. Default value is null

    - #### setValueType

          public SummarizeValueRequest setValueType(AIContentType valueType)

      The type of the `value`.
      Parameters:
        `valueType` - New valueType value. Default value is "text"
      Returns:
        `SummarizeValueRequest` instance, for chaining setter calls

    - #### getValueType

          public AIContentType getValueType()

      The type of the `value`.
      Returns:
        Current valueType value. Default value is "text"