Interface KernelHook<T extends KernelHookEvent>
-
- Type Parameters:
T- The type of the event that the hook is interested in
- All Superinterfaces:
Function<T,T>,Predicate<KernelHookEvent>
- All Known Subinterfaces:
KernelHook.FunctionInvokedHook,KernelHook.FunctionInvokingHook,KernelHook.PostChatCompletionHook,KernelHook.PreChatCompletionHook,KernelHook.PreToolCallHook,KernelHook.PromptRenderedHook,KernelHook.PromptRenderingHook
public interface KernelHook<T extends KernelHookEvent> extends Predicate<KernelHookEvent>, Function<T,T>
Represents a hook that can be used to intercept and modify arguments toKernelFunctions. AKernelHookimplements aPredicatethat determines if the hook is interested in a particular event, and aFunctionthat can be used to modify the event. The
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceKernelHook.FunctionInvokedHookA hook that acceptsFunctionInvokedEventstatic interfaceKernelHook.FunctionInvokingHookA hook that acceptsFunctionInvokingEventstatic interfaceKernelHook.PostChatCompletionHookA hook that acceptsPostChatCompletionEventstatic interfaceKernelHook.PreChatCompletionHookA hook that acceptsPreChatCompletionEventstatic interfaceKernelHook.PreToolCallHookA hook that acceptsPreToolCallEventstatic interfaceKernelHook.PromptRenderedHookA hook that acceptsPromptRenderedEventstatic interfaceKernelHook.PromptRenderingHookA hook that acceptsPromptRenderingEvent
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default intgetPriority()The priority of the hook.
-
-
-
Method Detail
-
getPriority
default int getPriority()
The priority of the hook. The default priority is 50. The priority is used to determine the order in which hooks that accept the same event type are executed, lower priorities are executed first. No ordering is guaranteed for hooks with the same priority.- Returns:
- the priority of the hook
-
-