ChatSession

interface ChatSession

Simplest possible conversation session implementation Responsible for keeping its conversation up to date

Inheritors

Properties

Link copied to clipboard

Conversation history. Kept up to date.

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

Subclasses should override this to provide a process ID if available.

Link copied to clipboard
abstract val user: User?

The Embabel User if known, null if not.

Functions

Link copied to clipboard
open fun isFinished(): Boolean

Is the conversation finished?

Link copied to clipboard
abstract fun onUserMessage(userMessage: UserMessage)

Update the conversation with a new message and respond to it. Any response messages will be sent to the messageListener, but also should be added to the conversation.

Link copied to clipboard
open fun saveAndSend(message: AssistantMessage)

Convenience method to add a message to the conversation