Class PromptConfiguration

    • Method Detail

      • additionalModelRequestFields

        public final Document additionalModelRequestFields()

        If the Converse or ConverseStream operations support the model, additionalModelRequestFields contains additional inference parameters, beyond the base set of inference parameters in the inferenceConfiguration field.

        For more information, see Inference request parameters and response fields for foundation models in the Amazon Bedrock user guide.

        Returns:
        If the Converse or ConverseStream operations support the model, additionalModelRequestFields contains additional inference parameters, beyond the base set of inference parameters in the inferenceConfiguration field.

        For more information, see Inference request parameters and response fields for foundation models in the Amazon Bedrock user guide.

      • foundationModel

        public final String foundationModel()

        The foundation model to use.

        Returns:
        The foundation model to use.
      • 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 you set the field as OVERRIDDEN, the overrideLambda field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.

        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. If you set the field as OVERRIDDEN, the overrideLambda field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.
        See Also:
        CreationMode
      • 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 you set the field as OVERRIDDEN, the overrideLambda field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.

        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. If you set the field as OVERRIDDEN, the overrideLambda field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.
        See Also:
        CreationMode
      • promptCreationMode

        public final CreationMode promptCreationMode()

        Specifies whether to override the default prompt template for this promptType. Set this value to OVERRIDDEN to use the prompt that you provide in the basePromptTemplate. If you leave it as DEFAULT, the agent uses a default prompt template.

        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 to override the default prompt template for this promptType. Set this value to OVERRIDDEN to use the prompt that you provide in the basePromptTemplate. If you leave it as DEFAULT, the agent uses a default prompt template.
        See Also:
        CreationMode
      • promptCreationModeAsString

        public final String promptCreationModeAsString()

        Specifies whether to override the default prompt template for this promptType. Set this value to OVERRIDDEN to use the prompt that you provide in the basePromptTemplate. If you leave it as DEFAULT, the agent uses a default prompt template.

        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 to override the default prompt template for this promptType. Set this value to OVERRIDDEN to use the prompt that you provide in the basePromptTemplate. If you leave it as DEFAULT, the agent uses a default prompt template.
        See Also:
        CreationMode
      • promptState

        public final PromptState promptState()

        Specifies whether to allow the inline agent to carry out the step specified in the promptType. If you set this value to DISABLED, the agent skips that step. The default state for each promptType is as follows.

        • PRE_PROCESSINGENABLED

        • ORCHESTRATIONENABLED

        • KNOWLEDGE_BASE_RESPONSE_GENERATIONENABLED

        • POST_PROCESSINGDISABLED

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

        Returns:
        Specifies whether to allow the inline agent to carry out the step specified in the promptType. If you set this value to DISABLED, the agent skips that step. The default state for each promptType is as follows.

        • PRE_PROCESSINGENABLED

        • ORCHESTRATIONENABLED

        • KNOWLEDGE_BASE_RESPONSE_GENERATIONENABLED

        • POST_PROCESSINGDISABLED

        See Also:
        PromptState
      • promptStateAsString

        public final String promptStateAsString()

        Specifies whether to allow the inline agent to carry out the step specified in the promptType. If you set this value to DISABLED, the agent skips that step. The default state for each promptType is as follows.

        • PRE_PROCESSINGENABLED

        • ORCHESTRATIONENABLED

        • KNOWLEDGE_BASE_RESPONSE_GENERATIONENABLED

        • POST_PROCESSINGDISABLED

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

        Returns:
        Specifies whether to allow the inline agent to carry out the step specified in the promptType. If you set this value to DISABLED, the agent skips that step. The default state for each promptType is as follows.

        • PRE_PROCESSINGENABLED

        • ORCHESTRATIONENABLED

        • KNOWLEDGE_BASE_RESPONSE_GENERATIONENABLED

        • POST_PROCESSINGDISABLED

        See Also:
        PromptState
      • promptType

        public final PromptType promptType()

        The step in the agent sequence that this prompt configuration applies to.

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

        Returns:
        The step in the agent sequence that this prompt configuration applies to.
        See Also:
        PromptType
      • promptTypeAsString

        public final String promptTypeAsString()

        The step in the agent sequence that this prompt configuration applies to.

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

        Returns:
        The step in the agent sequence that this prompt configuration applies to.
        See Also:
        PromptType
      • hashCode

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

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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)