Class PromptConfiguration

    • Method Detail

      • basePromptTemplate

        public final String basePromptTemplate()

        Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables.

        Returns:
        Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables.
      • 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 OVERRIDEN, 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 OVERRIDEN, 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 OVERRIDEN, 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 OVERRIDEN, 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 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 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 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 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)