Package-level declarations

Types

Link copied to clipboard
open class AssistantMessage constructor(content: String, val name: String? = null, val awaitable: Awaitable<*, *>? = null, val timestamp: Instant = Instant.now()) : Message

Message sent by the assistant - currently text-only

Link copied to clipboard
interface Chatbot

A chatbot can conduct multiple chat sessions, each identified by a contextId.

Link copied to clipboard
interface ChatSession

Simplest possible conversation session implementation Responsible for keeping its conversation up to date via Conversation.addMessage(), and for sending messages to the OutputChannel.

Link copied to clipboard
sealed interface ContentPart

Represents a part of a multimodal message. This sealed interface ensures type safety and extensibility for future media types.

Link copied to clipboard
interface Conversation

Conversation shim for agent system. Mutable.

Link copied to clipboard
fun interface ConversationFormatter

Format a conversation into a String for inclusion in a prompt. Note that we often prefer to use messages.

Link copied to clipboard
data class ImagePart(val mimeType: String, val data: ByteArray) : ContentPart

A part of a message containing image data.

Link copied to clipboard
sealed class Message

Message class for agent system - now supports multimodal content

Link copied to clipboard
fun interface MessageFormatter
Link copied to clipboard
enum Role : Enum<Role>

Role of the message sender. For visible messages, not user messages.

Link copied to clipboard
class SystemMessage constructor(content: String, val timestamp: Instant = Instant.now()) : Message

System message - text-only

Link copied to clipboard
data class TextPart(val text: String) : ContentPart

A part of a message containing text content.

Link copied to clipboard

Message sent by the user - supports multimodal content

Link copied to clipboard

Builder for creating multimodal UserMessages fluently

Link copied to clipboard
class WindowingConversationFormatter constructor(messageFormatter: MessageFormatter = SimpleMessageFormatter, windowSize: Int = 100) : ConversationFormatter

Conversation formatter that shows the last windowSize messages

Functions

Link copied to clipboard

Create a UserMessage builder