Class SingleSourceAIRequest

All Implemented Interfaces:
HasHandlers
Direct Known Subclasses:
AIFieldRequest, SystemAIRequest, UserAIRequest

public class SingleSourceAIRequest extends RefDataClass
Represents a request to AI from a single source in some context.
  • Constructor Details

    • SingleSourceAIRequest

      public SingleSourceAIRequest()
    • SingleSourceAIRequest

      public SingleSourceAIRequest(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static SingleSourceAIRequest getOrCreateRef(JavaScriptObject jsObj)
    • setAdditionalMessages

      public SingleSourceAIRequest setAdditionalMessages(AIMessage... additionalMessages)
      Additional messages. For example, the prompt may be an image, and additional text about the request can be added to this array.
      Parameters:
      additionalMessages - New additionalMessages value. Default value is null
      Returns:
      SingleSourceAIRequest instance, for chaining setter calls
    • getAdditionalMessages

      public AIMessage[] getAdditionalMessages()
      Additional messages. For example, the prompt may be an image, and additional text about the request can be added to this array.
      Returns:
      Current additionalMessages value. Default value is null
    • setPrompt

      public SingleSourceAIRequest setPrompt(Object prompt)
      The data of the request. The type of data is specified by the promptType.
      Parameters:
      prompt - New prompt value. Default value is null
      Returns:
      SingleSourceAIRequest instance, for chaining setter calls
    • getPrompt

      public Object getPrompt()
      The data of the request. The type of data is specified by the promptType.
      Returns:
      Current prompt value. Default value is null
    • setPromptType

      public SingleSourceAIRequest setPromptType(AIContentType promptType)
      The type of data of the prompt.
      Parameters:
      promptType - New promptType value. Default value is "text"
      Returns:
      SingleSourceAIRequest instance, for chaining setter calls
    • getPromptType

      public AIContentType getPromptType()
      The type of data of the prompt.
      Returns:
      Current promptType value. Default value is "text"