AfterLLMCallEvent

data class AfterLLMCallEvent(val runId: String, val prompt: Prompt, val model: String, val responses: List<Message.Response>, val moderationResponse: ModerationResult? = null, val eventId: String = AfterLLMCallEvent::class.simpleName!!) : DefinedFeatureEvent(source)

Represents an event signaling the completion of an LLM (Large Language Model) call.

This event encapsulates the responses provided by the LLM during its operation. It serves as a record of the responses generated by the LLM, marking the end of a particular interaction cycle. The event is used within the system to capture relevant output data and ensure proper tracking and logging of LLM-related interactions.

Constructors

Link copied to clipboard
constructor(runId: String, prompt: Prompt, model: String, responses: List<Message.Response>, moderationResponse: ModerationResult? = null, eventId: String = AfterLLMCallEvent::class.simpleName!!)

Properties

Link copied to clipboard
open override val eventId: String

The unique identifier of the event, which is set to the simple name of the AfterLLMCallEvent class by default. This is used to tag and track this type of event within the system.

Link copied to clipboard
open override val messageType: FeatureMessage.Type

Specifies the type of the feature message for this event.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A list of responses generated by the LLM, represented as instances of Message.Response. Each response contains content, metadata, and additional context about the interaction.

Link copied to clipboard
Link copied to clipboard
open override val timestamp: Long

The timestamp, represented as the number of milliseconds since the Unix epoch, indicating when the feature event was created.