interceptBeforeLLMCallWithTools
fun <TFeature : Any> interceptBeforeLLMCallWithTools(feature: AIAgentFeature<*, TFeature>, featureImpl: TFeature, handle: suspend TFeature.(prompt: Prompt, tools: List<ToolDescriptor>) -> Unit)(source)
Intercepts LLM calls with tools before they are made to modify or log the prompt and tools.
Parameters
handle
The handler that processes before-LLM-call-with-tools events
Example:
pipeline.interceptBeforeLLMCallWithTools(MyFeature, myFeatureImpl) { prompt, tools ->
// Inspect or modify the tools list before the call
}
Content copied to clipboard