KernelHook.PreChatCompletionHook Interface

Implements

public static interface KernelHook.PreChatCompletionHook
extends KernelHook<PreChatCompletionEvent>

A hook that accepts PreChatCompletionEvent

Method Summary

Modifier and Type Method and Description
static ChatCompletionsOptions cloneOptionsWithMessages(ChatCompletionsOptions options, List<ChatRequestMessage> messages)

A convenience method to clone the options with the messages from the event.

default boolean test(KernelHookEvent arguments)

Method Details

cloneOptionsWithMessages

public static ChatCompletionsOptions cloneOptionsWithMessages(ChatCompletionsOptions options, List messages)

A convenience method to clone the options with the messages from the event.

Parameters:

options - the options to clone
messages - the messages to use

Returns:

the new options

test

public default boolean test(KernelHookEvent arguments)

Parameters:

arguments

Applies to