LlmRequestEvent

class LlmRequestEvent<O>(val agentProcess: AgentProcess, val action: Action?, val outputClass: Class<O>, val interaction: LlmInteraction, val llmMetadata: LlmMetadata, val messages: List<Message>) : AbstractAgentProcessEvent

Constructors

Link copied to clipboard
constructor(agentProcess: AgentProcess, action: Action?, outputClass: Class<O>, interaction: LlmInteraction, llmMetadata: LlmMetadata, messages: List<Message>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val processId: String

ID of the process that this event relates to.

Link copied to clipboard
Link copied to clipboard
open val timestamp: Instant

Functions

Link copied to clipboard
fun <O> LlmRequestEvent<O>.chatModelCallEvent(springAiPrompt: <Error class: unknown class>): ChatModelCallEvent<O>

Return a low level event showing Spring AI prompt details.

Link copied to clipboard
fun failureEvent(throwable: Throwable, attempts: Int, maxAttempts: Int, runningTime: Duration): LlmCallFailedEvent

The call as a whole failed, whether or not it was retried.

Link copied to clipboard
fun maybeResponseEvent(response: <Error class: unknown class><O>, runningTime: Duration): LlmResponseEvent<<Error class: unknown class><O>>
Link copied to clipboard
fun maybeThinkingResponseEvent(response: <Error class: unknown class><ThinkingResponse<O>>, runningTime: Duration): LlmResponseEvent<<Error class: unknown class><ThinkingResponse<O>>>
Link copied to clipboard
fun responseEvent(response: O, runningTime: Duration): LlmResponseEvent<O>
Link copied to clipboard
fun retryEvent(throwable: Throwable, attempts: Int, maxAttempts: Int, runningTime: Duration): LlmRetryEvent

A failed attempt that is about to be retried.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String