Class GlobalStreamOptions

java.lang.Object
com.sap.ai.sdk.prompt.registry.model.GlobalStreamOptions

public class GlobalStreamOptions extends Object
Options for streaming. Will be ignored if enabled is false.
  • Constructor Details

    • GlobalStreamOptions

      protected GlobalStreamOptions()
      Default constructor for GlobalStreamOptions.
  • Method Details

    • enabled

      @Nonnull public GlobalStreamOptions enabled(@Nullable Boolean enabled)
      Set the enabled of this GlobalStreamOptions instance and return the same instance.
      Parameters:
      enabled - If true, the response will be streamed back to the client
      Returns:
      The same instance of this GlobalStreamOptions class
    • isEnabled

      @Nonnull public Boolean isEnabled()
      If true, the response will be streamed back to the client
      Returns:
      enabled The enabled of this GlobalStreamOptions instance.
    • setEnabled

      public void setEnabled(@Nullable Boolean enabled)
      Set the enabled of this GlobalStreamOptions instance.
      Parameters:
      enabled - If true, the response will be streamed back to the client
    • chunkSize

      @Nonnull public GlobalStreamOptions chunkSize(@Nullable Integer chunkSize)
      Set the chunkSize of this GlobalStreamOptions instance and return the same instance.
      Parameters:
      chunkSize - Minimum number of characters per chunk that post-LLM modules operate on. Minimum: 1 Maximum: 10000
      Returns:
      The same instance of this GlobalStreamOptions class
    • getChunkSize

      @Nonnull public Integer getChunkSize()
      Minimum number of characters per chunk that post-LLM modules operate on. minimum: 1 maximum: 10000
      Returns:
      chunkSize The chunkSize of this GlobalStreamOptions instance.
    • setChunkSize

      public void setChunkSize(@Nullable Integer chunkSize)
      Set the chunkSize of this GlobalStreamOptions instance.
      Parameters:
      chunkSize - Minimum number of characters per chunk that post-LLM modules operate on. Minimum: 1 Maximum: 10000
    • delimiters

      @Nonnull public GlobalStreamOptions delimiters(@Nullable List<String> delimiters)
      Set the delimiters of this GlobalStreamOptions instance and return the same instance.
      Parameters:
      delimiters - List of delimiters to split the input text into chunks.Please note, this is a required parameter when `input_translation_module_config` or `output_translation_module_config` are configured.
      Returns:
      The same instance of this GlobalStreamOptions class
    • addDelimitersItem

      @Nonnull public GlobalStreamOptions addDelimitersItem(@Nonnull String delimitersItem)
      Add one delimiters instance to this GlobalStreamOptions.
      Parameters:
      delimitersItem - The delimiters that should be added
      Returns:
      The same instance of type GlobalStreamOptions
    • getDelimiters

      @Nonnull public List<String> getDelimiters()
      List of delimiters to split the input text into chunks.Please note, this is a required parameter when `input_translation_module_config` or `output_translation_module_config` are configured.
      Returns:
      delimiters The delimiters of this GlobalStreamOptions instance.
    • setDelimiters

      public void setDelimiters(@Nullable List<String> delimiters)
      Set the delimiters of this GlobalStreamOptions instance.
      Parameters:
      delimiters - List of delimiters to split the input text into chunks.Please note, this is a required parameter when `input_translation_module_config` or `output_translation_module_config` are configured.
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the GlobalStreamOptions.
      Returns:
      The set of properties names
    • getCustomField

      @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
      Deprecated.
      Use toMap() instead.
      Get the value of an unrecognizable property of this GlobalStreamOptions instance.
      Parameters:
      name - The name of the property
      Returns:
      The value of the property
      Throws:
      NoSuchElementException - If no property with the given name could be found.
    • toMap

      @Nonnull public Map<String,Object> toMap()
      Get the value of all properties of this GlobalStreamOptions instance including unrecognized properties.
      Returns:
      The map of all properties
    • setCustomField

      public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
      Set an unrecognizable property of this GlobalStreamOptions instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      customFieldName - The name of the property
      customFieldValue - The value of the property
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • create

      public static GlobalStreamOptions create()
      Create a new GlobalStreamOptions instance. No arguments are required.