onLLMCallCompleted

expect open suspend override fun onLLMCallCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, responses: List<Message.Response>, moderationResponse: ModerationResult?, context: AIAgentContext)(source)

Notifies all registered LLM handlers after a language model call has completed.

Parameters

eventId

The unique identifier for the event group.

executionInfo

The execution information for the LLM call event

runId

Identifier for the current run.

prompt

The prompt that was sent to the language model

model

The language model instance that processed the request

tools

The list of tool descriptors that were available for the LLM call

responses

The response messages received from the language model

moderationResponse

The moderation response, if any, received from the language model