Package com.embabel.agent.core.hitl
Class AwaitingToolsKt
-
- All Implemented Interfaces:
public final class AwaitingToolsKt
-
-
Method Summary
Modifier and Type Method Description final static ToolwithConfirmation(Tool $self, Function1<String, String> messageProvider)Wrap this tool to always require confirmation before execution. final static ToolwithConfirmation(Tool $self, String message)Wrap this tool to always require confirmation before execution. final static ToolwithAwaiting(Tool $self, AwaitDecider decider)Wrap this tool to conditionally await before execution. final static <T extends Any> ToolrequireType(Tool $self, Class<T> type, Function1<String, String> messageProvider)Wrap this tool to require a value of type T before execution. final static <T extends Any> ToolrequireType(Tool $self, String message)Wrap this tool to require a value of type T before execution (reified). -
-
Method Detail
-
withConfirmation
final static Tool withConfirmation(Tool $self, Function1<String, String> messageProvider)
Wrap this tool to always require confirmation before execution.
- Parameters:
messageProvider- Function to generate the confirmation message from input
-
withConfirmation
final static Tool withConfirmation(Tool $self, String message)
Wrap this tool to always require confirmation before execution.
- Parameters:
message- Static confirmation message
-
withAwaiting
final static Tool withAwaiting(Tool $self, AwaitDecider decider)
Wrap this tool to conditionally await before execution.
- Parameters:
decider- Function that decides whether to await based on input context
-
requireType
final static <T extends Any> Tool requireType(Tool $self, Class<T> type, Function1<String, String> messageProvider)
Wrap this tool to require a value of type T before execution.
- Parameters:
type- The class of the requested typemessageProvider- Function to generate the request message from input
-
requireType
final static <T extends Any> Tool requireType(Tool $self, String message)
Wrap this tool to require a value of type T before execution (reified).
- Parameters:
message- Optional message explaining what's needed
-
-
-
-