AgentProcessChatbot

class AgentProcessChatbot(agentPlatform: AgentPlatform, agentSource: AgentSource, listenerProvider: ListenerProvider = ListenerProvider { user, outputChannel -> emptyList() }) : Chatbot

Chatbot implementation backed by an AgentProcess The AgentProcess must react to messages and respond on its output channel The AgentProcess can assume that the Conversation will be available in the blackboard, and the latest UserMessage. Action methods will often take precondition being that the last event was a UserMessage. A convenient approach is for the core action methods to return ChatbotReturn, and handle ConversationOver, although that is not required.

Parameters

agentPlatform

the agent platform to create and manage agent processes

agentSource

factory for agents. The factory is called for each new session. This allows lazy loading and more flexible usage patterns

Constructors

Link copied to clipboard
constructor(agentPlatform: AgentPlatform, agentSource: AgentSource, listenerProvider: ListenerProvider = ListenerProvider { user, outputChannel -> emptyList() })

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun createSession(user: User?, outputChannel: OutputChannel, systemMessage: String?): ChatSession

Create a new chat session. If user is provided, the session will be associated with that user. Optionally, a system message can be provided to set the context for the session.

Link copied to clipboard
open override fun findSession(conversationId: String): ChatSession?

Get a chat session by conversation id.