Class NvidiaTaskSettings.Builder

All Implemented Interfaces:
WithJson<NvidiaTaskSettings.Builder>, ObjectBuilder<NvidiaTaskSettings>
Enclosing class:
NvidiaTaskSettings

public static class NvidiaTaskSettings.Builder extends WithJsonObjectBuilderBase<NvidiaTaskSettings.Builder> implements ObjectBuilder<NvidiaTaskSettings>
Builder for NvidiaTaskSettings.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • inputType

      public final NvidiaTaskSettings.Builder inputType(@Nullable NvidiaInputType value)
      For a text_embedding task, type of input sent to the Nvidia endpoint. Valid values are:
      • ingest: Mapped to Nvidia's passage value in request. Used when generating embeddings during indexing.
      • search: Mapped to Nvidia's query value in request. Used when generating embeddings during querying.

      IMPORTANT: For Nvidia endpoints, if the input_type field is not specified, it defaults to query.

      API name: input_type

    • truncate

      public final NvidiaTaskSettings.Builder truncate(@Nullable CohereTruncateType value)
      For a text_embedding task, the method used by the Nvidia model to handle inputs longer than the maximum token length. Valid values are:
      • END: When the input exceeds the maximum input token length, the end of the input is discarded.
      • NONE: When the input exceeds the maximum input token length, an error is returned.
      • START: When the input exceeds the maximum input token length, the start of the input is discarded.

      API name: truncate

    • self

      protected NvidiaTaskSettings.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<NvidiaTaskSettings.Builder>
    • build

      public NvidiaTaskSettings build()
      Specified by:
      build in interface ObjectBuilder<NvidiaTaskSettings>
      Throws:
      NullPointerException - if some of the required fields are null.