Class ModelInvocationInput

java.lang.Object
software.amazon.awssdk.services.bedrockagentruntime.model.ModelInvocationInput
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ModelInvocationInput.Builder,ModelInvocationInput>

@Generated("software.amazon.awssdk:codegen") public final class ModelInvocationInput extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ModelInvocationInput.Builder,ModelInvocationInput>

The input for the pre-processing step.

  • The type matches the agent step.

  • The text contains the prompt.

  • The inferenceConfiguration, parserMode, and overrideLambda values are set in the PromptOverrideConfiguration object that was set when the agent was created or updated.

See Also:
  • Method Details

    • inferenceConfiguration

      public final InferenceConfiguration inferenceConfiguration()

      Specifications about the inference parameters that were provided alongside the prompt. These are specified in the PromptOverrideConfiguration object that was set when the agent was created or updated. For more information, see Inference parameters for foundation models.

      Returns:
      Specifications about the inference parameters that were provided alongside the prompt. These are specified in the PromptOverrideConfiguration object that was set when the agent was created or updated. For more information, see Inference parameters for foundation models.
    • overrideLambda

      public final String overrideLambda()

      The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence.

      Returns:
      The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence.
    • parserMode

      public final CreationMode parserMode()

      Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType.

      If the service returns an enum value that is not available in the current SDK version, parserMode will return CreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from parserModeAsString().

      Returns:
      Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType.
      See Also:
    • parserModeAsString

      public final String parserModeAsString()

      Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType.

      If the service returns an enum value that is not available in the current SDK version, parserMode will return CreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from parserModeAsString().

      Returns:
      Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType.
      See Also:
    • promptCreationMode

      public final CreationMode promptCreationMode()

      Specifies whether the default prompt template was OVERRIDDEN. If it was, the basePromptTemplate that was set in the PromptOverrideConfiguration object when the agent was created or updated is used instead.

      If the service returns an enum value that is not available in the current SDK version, promptCreationMode will return CreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from promptCreationModeAsString().

      Returns:
      Specifies whether the default prompt template was OVERRIDDEN. If it was, the basePromptTemplate that was set in the PromptOverrideConfiguration object when the agent was created or updated is used instead.
      See Also:
    • promptCreationModeAsString

      public final String promptCreationModeAsString()

      Specifies whether the default prompt template was OVERRIDDEN. If it was, the basePromptTemplate that was set in the PromptOverrideConfiguration object when the agent was created or updated is used instead.

      If the service returns an enum value that is not available in the current SDK version, promptCreationMode will return CreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from promptCreationModeAsString().

      Returns:
      Specifies whether the default prompt template was OVERRIDDEN. If it was, the basePromptTemplate that was set in the PromptOverrideConfiguration object when the agent was created or updated is used instead.
      See Also:
    • text

      public final String text()

      The text that prompted the agent at this step.

      Returns:
      The text that prompted the agent at this step.
    • traceId

      public final String traceId()

      The unique identifier of the trace.

      Returns:
      The unique identifier of the trace.
    • type

      public final PromptType type()

      The step in the agent sequence.

      If the service returns an enum value that is not available in the current SDK version, type will return PromptType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      Returns:
      The step in the agent sequence.
      See Also:
    • typeAsString

      public final String typeAsString()

      The step in the agent sequence.

      If the service returns an enum value that is not available in the current SDK version, type will return PromptType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      Returns:
      The step in the agent sequence.
      See Also:
    • toBuilder

      public ModelInvocationInput.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ModelInvocationInput.Builder,ModelInvocationInput>
      Returns:
      a builder for type T
    • builder

      public static ModelInvocationInput.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ModelInvocationInput.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.