SessionState

org.llm4s.assistant.SessionState
See theSessionState companion object
@Experimental
case class SessionState(threadId: Option[ThreadId], last: Option[AgentResult], sessionId: SessionId, sessionDir: DirectoryPath, created: LocalDateTime, history: Vector[Message])

Represents the state of an interactive assistant session.

The conversation lives on a thread of the assistant's agent: threadId names it once a turn has run, and last is that turn's result. A loaded session has neither yet: its saved messages are in history, and the next turn imports them into a new thread.

Value parameters

created

Timestamp when the session was created

history

Messages loaded from a saved session, imported by the next turn

last

The result of the latest turn on threadId

sessionDir

Directory path for session file storage

sessionId

Unique identifier for this session

threadId

The agent thread holding the conversation, once a turn has run on it

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def messages: Vector[Message]

The conversation so far: the latest turn's messages, or the loaded history before any turn.

The conversation so far: the latest turn's messages, or the loaded history before any turn.

Attributes

A fresh session with no thread. The caller forgets this session's thread, which nothing continues.

A fresh session with no thread. The caller forgets this session's thread, which nothing continues.

Attributes

The state after result, a turn on its thread: the loaded history is now part of the thread.

The state after result, a turn on its thread: the loaded history is now part of the thread.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product