Class Trace
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.Trace
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Trace.Builder,Trace>
@Generated("software.amazon.awssdk:codegen") public final class Trace extends Object implements SdkPojo, Serializable, 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTrace.Builderstatic classTrace.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Trace.Builderbuilder()CustomOrchestrationTracecustomOrchestrationTrace()Details about the custom orchestration step in which the agent determines the order in which actions are executed.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)FailureTracefailureTrace()Contains information about the failure of the interaction.static TracefromCustomOrchestrationTrace(Consumer<CustomOrchestrationTrace.Builder> customOrchestrationTrace)Create an instance of this class withcustomOrchestrationTrace()initialized to the given value.static TracefromCustomOrchestrationTrace(CustomOrchestrationTrace customOrchestrationTrace)Create an instance of this class withcustomOrchestrationTrace()initialized to the given value.static TracefromFailureTrace(Consumer<FailureTrace.Builder> failureTrace)Create an instance of this class withfailureTrace()initialized to the given value.static TracefromFailureTrace(FailureTrace failureTrace)Create an instance of this class withfailureTrace()initialized to the given value.static TracefromGuardrailTrace(Consumer<GuardrailTrace.Builder> guardrailTrace)Create an instance of this class withguardrailTrace()initialized to the given value.static TracefromGuardrailTrace(GuardrailTrace guardrailTrace)Create an instance of this class withguardrailTrace()initialized to the given value.static TracefromOrchestrationTrace(Consumer<OrchestrationTrace.Builder> orchestrationTrace)Create an instance of this class withorchestrationTrace()initialized to the given value.static TracefromOrchestrationTrace(OrchestrationTrace orchestrationTrace)Create an instance of this class withorchestrationTrace()initialized to the given value.static TracefromPostProcessingTrace(Consumer<PostProcessingTrace.Builder> postProcessingTrace)Create an instance of this class withpostProcessingTrace()initialized to the given value.static TracefromPostProcessingTrace(PostProcessingTrace postProcessingTrace)Create an instance of this class withpostProcessingTrace()initialized to the given value.static TracefromPreProcessingTrace(Consumer<PreProcessingTrace.Builder> preProcessingTrace)Create an instance of this class withpreProcessingTrace()initialized to the given value.static TracefromPreProcessingTrace(PreProcessingTrace preProcessingTrace)Create an instance of this class withpreProcessingTrace()initialized to the given value.static TracefromRoutingClassifierTrace(Consumer<RoutingClassifierTrace.Builder> routingClassifierTrace)Create an instance of this class withroutingClassifierTrace()initialized to the given value.static TracefromRoutingClassifierTrace(RoutingClassifierTrace routingClassifierTrace)Create an instance of this class withroutingClassifierTrace()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)GuardrailTraceguardrailTrace()The trace details for a trace defined in the Guardrail filter.inthashCode()OrchestrationTraceorchestrationTrace()Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.PostProcessingTracepostProcessingTrace()Details about the post-processing step, in which the agent shapes the response..PreProcessingTracepreProcessingTrace()Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.RoutingClassifierTraceroutingClassifierTrace()A routing classifier's trace.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Trace.Builder>serializableBuilderClass()Trace.BuildertoBuilder()StringtoString()Returns a string representation of this object.Trace.Typetype()Retrieve an enum value representing which member of this object is populated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
customOrchestrationTrace
public final CustomOrchestrationTrace 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
public final FailureTrace failureTrace()
Contains information about the failure of the interaction.
- Returns:
- Contains information about the failure of the interaction.
-
guardrailTrace
public final GuardrailTrace 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
public final OrchestrationTrace 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
public final PostProcessingTrace 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
public final PreProcessingTrace 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
public final RoutingClassifierTrace routingClassifierTrace()
A routing classifier's trace.
- Returns:
- A routing classifier's trace.
-
toBuilder
public Trace.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Trace.Builder,Trace>
-
builder
public static Trace.Builder builder()
-
serializableBuilderClass
public static Class<? extends Trace.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
fromCustomOrchestrationTrace
public static Trace fromCustomOrchestrationTrace(CustomOrchestrationTrace 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.
-
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
public static Trace fromFailureTrace(FailureTrace failureTrace)
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
public static Trace fromFailureTrace(Consumer<FailureTrace.Builder> failureTrace)
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
public static Trace fromGuardrailTrace(GuardrailTrace guardrailTrace)
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
public static Trace fromGuardrailTrace(Consumer<GuardrailTrace.Builder> guardrailTrace)
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
public static Trace fromOrchestrationTrace(OrchestrationTrace orchestrationTrace)
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
public static Trace fromOrchestrationTrace(Consumer<OrchestrationTrace.Builder> orchestrationTrace)
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
public static Trace fromPostProcessingTrace(PostProcessingTrace 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..
-
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
public static Trace fromPreProcessingTrace(PreProcessingTrace preProcessingTrace)
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
public static Trace fromPreProcessingTrace(Consumer<PreProcessingTrace.Builder> preProcessingTrace)
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
public static Trace fromRoutingClassifierTrace(RoutingClassifierTrace 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.
-
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
public Trace.Type 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_VERSIONif 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_VERSIONif zero members are set, andnullif more than one member is set.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-