Interface HarnessHook.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<HarnessHook.Builder,,HarnessHook> SdkBuilder<HarnessHook.Builder,,HarnessHook> SdkPojo
- Enclosing class:
HarnessHook
-
Method Summary
Modifier and TypeMethodDescriptiondefault HarnessHook.BuilderafterInvocation(Consumer<HarnessAfterInvocationHook.Builder> afterInvocation) A hook that runs after an invocation completes.afterInvocation(HarnessAfterInvocationHook afterInvocation) A hook that runs after an invocation completes.default HarnessHook.BuilderafterToolCall(Consumer<HarnessAfterToolCallHook.Builder> afterToolCall) A hook that runs after a tool call completes.afterToolCall(HarnessAfterToolCallHook afterToolCall) A hook that runs after a tool call completes.default HarnessHook.BuilderbeforeInvocation(Consumer<HarnessBeforeInvocationHook.Builder> beforeInvocation) A hook that runs before an invocation begins.beforeInvocation(HarnessBeforeInvocationHook beforeInvocation) A hook that runs before an invocation begins.default HarnessHook.BuilderbeforeToolCall(Consumer<HarnessBeforeToolCallHook.Builder> beforeToolCall) A hook that runs before the agent calls a tool.beforeToolCall(HarnessBeforeToolCallHook beforeToolCall) A hook that runs before the agent calls a tool.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
beforeInvocation
A hook that runs before an invocation begins.
- Parameters:
beforeInvocation- A hook that runs before an invocation begins.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
beforeInvocation
default HarnessHook.Builder beforeInvocation(Consumer<HarnessBeforeInvocationHook.Builder> beforeInvocation) A hook that runs before an invocation begins.
This is a convenience method that creates an instance of theHarnessBeforeInvocationHook.Builderavoiding the need to create one manually viaHarnessBeforeInvocationHook.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tobeforeInvocation(HarnessBeforeInvocationHook).- Parameters:
beforeInvocation- a consumer that will call methods onHarnessBeforeInvocationHook.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
afterInvocation
A hook that runs after an invocation completes.
- Parameters:
afterInvocation- A hook that runs after an invocation completes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
afterInvocation
default HarnessHook.Builder afterInvocation(Consumer<HarnessAfterInvocationHook.Builder> afterInvocation) A hook that runs after an invocation completes.
This is a convenience method that creates an instance of theHarnessAfterInvocationHook.Builderavoiding the need to create one manually viaHarnessAfterInvocationHook.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toafterInvocation(HarnessAfterInvocationHook).- Parameters:
afterInvocation- a consumer that will call methods onHarnessAfterInvocationHook.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
beforeToolCall
A hook that runs before the agent calls a tool.
- Parameters:
beforeToolCall- A hook that runs before the agent calls a tool.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
beforeToolCall
default HarnessHook.Builder beforeToolCall(Consumer<HarnessBeforeToolCallHook.Builder> beforeToolCall) A hook that runs before the agent calls a tool.
This is a convenience method that creates an instance of theHarnessBeforeToolCallHook.Builderavoiding the need to create one manually viaHarnessBeforeToolCallHook.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tobeforeToolCall(HarnessBeforeToolCallHook).- Parameters:
beforeToolCall- a consumer that will call methods onHarnessBeforeToolCallHook.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
afterToolCall
A hook that runs after a tool call completes.
- Parameters:
afterToolCall- A hook that runs after a tool call completes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
afterToolCall
A hook that runs after a tool call completes.
This is a convenience method that creates an instance of theHarnessAfterToolCallHook.Builderavoiding the need to create one manually viaHarnessAfterToolCallHook.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toafterToolCall(HarnessAfterToolCallHook).- Parameters:
afterToolCall- a consumer that will call methods onHarnessAfterToolCallHook.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-