Conversation

interface Conversation

Conversation shim for agent system. Mutable.

Inheritors

Properties

Link copied to clipboard
abstract val messages: List<Message>

Functions

Link copied to clipboard
abstract fun addMessage(message: Message): Message

Modify the state of this conversation Return the newly added message for convenience

Link copied to clipboard
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard
abstract infix fun last(n: Int): Conversation

Create a nonpersistent conversation with the last n messages from this conversation.

Link copied to clipboard

Non-null if the conversation has messages and the last message is from the user.

Link copied to clipboard
open fun promptContributor(conversationFormatter: ConversationFormatter = WindowingConversationFormatter()): <Error class: unknown class>

Prompt contributor that represents the conversation so far. Usually we will want to add messages from the conversation instead of formatting the conversation