Class SummarizeValueRequest

All Implemented Interfaces:
HasHandlers

public class SummarizeValueRequest extends DataBoundAIRequest
Represents a request to AI to generate a summary of an individual value.
  • Constructor Details

    • SummarizeValueRequest

      public SummarizeValueRequest()
    • SummarizeValueRequest

      public SummarizeValueRequest(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static SummarizeValueRequest getOrCreateRef(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(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:
    • getFieldName

      public String getFieldName()
      If specified, the name of the field containing the value.
      Returns:
      Current fieldName value. Default value is null
      See Also:
    • 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(String... relevantFieldNames)
      If specified, the names of the DBCFields of the component (or DataSourceFields 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:
    • getRelevantFieldNames

      public String[] getRelevantFieldNames()
      If specified, the names of the DBCFields of the component (or DataSourceFields of the dataSource) that are relevant to the request to summarize the value.
      Returns:
      Current relevantFieldNames value. Default value is null
      See Also:
    • setValue

      public SummarizeValueRequest setValue(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 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"