onBeforeLLMCall

fun onBeforeLLMCall(handler: suspend (eventContext: BeforeLLMCallContext) -> Unit)(source)

Append handler called before a call is made to the language model.


var onBeforeLLMCall: suspend (prompt: Prompt, tools: List<ToolDescriptor>, model: LLModel, sessionUuid: Uuid) -> Unit(source)

Deprecated

Please use onBeforeLLMCall() instead

Replace with

onBeforeLLMCall(handler)

Deprecated variable used to define a handler that is invoked before a call is made to the language model.

It allows custom logic to be executed before making a call to the language model with the given prompt, tools, model, and session UUID.