Session

data class Session(val key: SessionKey, val state: State = State(), val events: MutableList<Event> = concurrentMutableListOf(), var lastUpdateTime: ERROR CLASS: Symbol not found for Instant = Instant.fromEpochMilliseconds(0))

A Session object that encapsulates the State and Events of a session.

Constructors

Link copied to clipboard
constructor(key: SessionKey, state: State = State(), events: MutableList<Event> = concurrentMutableListOf(), lastUpdateTime: ERROR CLASS: Symbol not found for Instant = Instant.fromEpochMilliseconds(0))

Types

Link copied to clipboard
class Builder

Fluent builder for Session, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The events of the session, e.g. user input, model response, function call/response, etc. Defaults to a concurrent list so that appending an event (e.g. from one parallel branch) while another reads the history does not throw ConcurrentModificationException.

Link copied to clipboard

The composite identifier of the session (SessionKey.appName, SessionKey.userId, SessionKey.id).

Link copied to clipboard
var lastUpdateTime: ERROR CLASS: Symbol not found for Instant

The last update time of the session. Defaults to Instant.EPOCH.

Link copied to clipboard

The state of the session.