interceptLLMCallStarting
fun interceptLLMCallStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallStartingContext) -> Unit)(source)
Intercepts LLM calls before they are made to modify or log the prompt.
Parameters
feature
The feature associated with this handler.
handle
The handler that processes before-LLM-call events
Example:
pipeline.interceptLLMCallStarting(feature) { eventContext ->
logger.info("About to make LLM call with prompt: ${eventContext.prompt.messages.last().content}")
}
Content copied to clipboard