Class Trace
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Trace.Builder,
Trace>
Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Trace.Builder
builder()
final CustomOrchestrationTrace
Details about the custom orchestration step in which the agent determines the order in which actions are executed.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final FailureTrace
Contains information about the failure of the interaction.static Trace
fromCustomOrchestrationTrace
(Consumer<CustomOrchestrationTrace.Builder> customOrchestrationTrace) Create an instance of this class withcustomOrchestrationTrace()
initialized to the given value.static Trace
fromCustomOrchestrationTrace
(CustomOrchestrationTrace customOrchestrationTrace) Create an instance of this class withcustomOrchestrationTrace()
initialized to the given value.static Trace
fromFailureTrace
(Consumer<FailureTrace.Builder> failureTrace) Create an instance of this class withfailureTrace()
initialized to the given value.static Trace
fromFailureTrace
(FailureTrace failureTrace) Create an instance of this class withfailureTrace()
initialized to the given value.static Trace
fromGuardrailTrace
(Consumer<GuardrailTrace.Builder> guardrailTrace) Create an instance of this class withguardrailTrace()
initialized to the given value.static Trace
fromGuardrailTrace
(GuardrailTrace guardrailTrace) Create an instance of this class withguardrailTrace()
initialized to the given value.static Trace
fromOrchestrationTrace
(Consumer<OrchestrationTrace.Builder> orchestrationTrace) Create an instance of this class withorchestrationTrace()
initialized to the given value.static Trace
fromOrchestrationTrace
(OrchestrationTrace orchestrationTrace) Create an instance of this class withorchestrationTrace()
initialized to the given value.static Trace
fromPostProcessingTrace
(Consumer<PostProcessingTrace.Builder> postProcessingTrace) Create an instance of this class withpostProcessingTrace()
initialized to the given value.static Trace
fromPostProcessingTrace
(PostProcessingTrace postProcessingTrace) Create an instance of this class withpostProcessingTrace()
initialized to the given value.static Trace
fromPreProcessingTrace
(Consumer<PreProcessingTrace.Builder> preProcessingTrace) Create an instance of this class withpreProcessingTrace()
initialized to the given value.static Trace
fromPreProcessingTrace
(PreProcessingTrace preProcessingTrace) Create an instance of this class withpreProcessingTrace()
initialized to the given value.static Trace
fromRoutingClassifierTrace
(Consumer<RoutingClassifierTrace.Builder> routingClassifierTrace) Create an instance of this class withroutingClassifierTrace()
initialized to the given value.static Trace
fromRoutingClassifierTrace
(RoutingClassifierTrace routingClassifierTrace) Create an instance of this class withroutingClassifierTrace()
initialized to the given value.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final GuardrailTrace
The trace details for a trace defined in the Guardrail filter.final int
hashCode()
final OrchestrationTrace
Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.final PostProcessingTrace
Details about the post-processing step, in which the agent shapes the response..final PreProcessingTrace
Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.final RoutingClassifierTrace
A routing classifier's trace.static Class
<? extends Trace.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.type()
Retrieve an enum value representing which member of this object is populated.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
customOrchestrationTrace
Details about the custom orchestration step in which the agent determines the order in which actions are executed.
- Returns:
- Details about the custom orchestration step in which the agent determines the order in which actions are executed.
-
failureTrace
Contains information about the failure of the interaction.
- Returns:
- Contains information about the failure of the interaction.
-
guardrailTrace
The trace details for a trace defined in the Guardrail filter.
- Returns:
- The trace details for a trace defined in the Guardrail filter.
-
orchestrationTrace
Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
- Returns:
- Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
-
postProcessingTrace
Details about the post-processing step, in which the agent shapes the response..
- Returns:
- Details about the post-processing step, in which the agent shapes the response..
-
preProcessingTrace
Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
- Returns:
- Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
-
routingClassifierTrace
A routing classifier's trace.
- Returns:
- A routing classifier's trace.
-
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 interfaceToCopyableBuilder<Trace.Builder,
Trace> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
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 anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
fromCustomOrchestrationTrace
Create an instance of this class withcustomOrchestrationTrace()
initialized to the given value.Details about the custom orchestration step in which the agent determines the order in which actions are executed.
- Parameters:
customOrchestrationTrace
- Details about the custom orchestration step in which the agent determines the order in which actions are executed.
-
fromCustomOrchestrationTrace
public static Trace fromCustomOrchestrationTrace(Consumer<CustomOrchestrationTrace.Builder> customOrchestrationTrace) Create an instance of this class withcustomOrchestrationTrace()
initialized to the given value.Details about the custom orchestration step in which the agent determines the order in which actions are executed.
- Parameters:
customOrchestrationTrace
- Details about the custom orchestration step in which the agent determines the order in which actions are executed.
-
fromFailureTrace
Create an instance of this class withfailureTrace()
initialized to the given value.Contains information about the failure of the interaction.
- Parameters:
failureTrace
- Contains information about the failure of the interaction.
-
fromFailureTrace
Create an instance of this class withfailureTrace()
initialized to the given value.Contains information about the failure of the interaction.
- Parameters:
failureTrace
- Contains information about the failure of the interaction.
-
fromGuardrailTrace
Create an instance of this class withguardrailTrace()
initialized to the given value.The trace details for a trace defined in the Guardrail filter.
- Parameters:
guardrailTrace
- The trace details for a trace defined in the Guardrail filter.
-
fromGuardrailTrace
Create an instance of this class withguardrailTrace()
initialized to the given value.The trace details for a trace defined in the Guardrail filter.
- Parameters:
guardrailTrace
- The trace details for a trace defined in the Guardrail filter.
-
fromOrchestrationTrace
Create an instance of this class withorchestrationTrace()
initialized to the given value.Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
- Parameters:
orchestrationTrace
- Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
-
fromOrchestrationTrace
Create an instance of this class withorchestrationTrace()
initialized to the given value.Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
- Parameters:
orchestrationTrace
- Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
-
fromPostProcessingTrace
Create an instance of this class withpostProcessingTrace()
initialized to the given value.Details about the post-processing step, in which the agent shapes the response..
- Parameters:
postProcessingTrace
- Details about the post-processing step, in which the agent shapes the response..
-
fromPostProcessingTrace
public static Trace fromPostProcessingTrace(Consumer<PostProcessingTrace.Builder> postProcessingTrace) Create an instance of this class withpostProcessingTrace()
initialized to the given value.Details about the post-processing step, in which the agent shapes the response..
- Parameters:
postProcessingTrace
- Details about the post-processing step, in which the agent shapes the response..
-
fromPreProcessingTrace
Create an instance of this class withpreProcessingTrace()
initialized to the given value.Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
- Parameters:
preProcessingTrace
- Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
-
fromPreProcessingTrace
Create an instance of this class withpreProcessingTrace()
initialized to the given value.Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
- Parameters:
preProcessingTrace
- Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
-
fromRoutingClassifierTrace
Create an instance of this class withroutingClassifierTrace()
initialized to the given value.A routing classifier's trace.
- Parameters:
routingClassifierTrace
- A routing classifier's trace.
-
fromRoutingClassifierTrace
public static Trace fromRoutingClassifierTrace(Consumer<RoutingClassifierTrace.Builder> routingClassifierTrace) Create an instance of this class withroutingClassifierTrace()
initialized to the given value.A routing classifier's trace.
- Parameters:
routingClassifierTrace
- A routing classifier's trace.
-
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beTrace.Type.UNKNOWN_TO_SDK_VERSION
if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beTrace.Type.UNKNOWN_TO_SDK_VERSION
if zero members are set, andnull
if more than one member is set. -
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-