Package com.embabel.chat
Interface Conversation
-
- All Implemented Interfaces:
-
com.embabel.common.core.Identified,com.embabel.common.core.StableIdentified,com.embabel.common.core.types.HasInfoString
public interface Conversation implements StableIdentified, HasInfoStringConversation shim for agent system. Mutable.
-
-
Method Summary
Modifier and Type Method Description UserMessagelastMessageIfBeFromUser()Non-null if the conversation has messages and the last message is from the user. abstract ConversationaddMessage(Message message)Modify the state of this conversation This method is mutable, and returns itself only for convenience PromptContributorpromptContributor(ConversationFormatter conversationFormatter)Prompt contributor that represents the conversation so far. StringinfoString(Boolean verbose, Integer indent)abstract List<Message>getMessages()-
-
Method Detail
-
lastMessageIfBeFromUser
UserMessage lastMessageIfBeFromUser()
Non-null if the conversation has messages and the last message is from the user.
-
addMessage
abstract Conversation addMessage(Message message)
Modify the state of this conversation This method is mutable, and returns itself only for convenience
-
promptContributor
PromptContributor promptContributor(ConversationFormatter conversationFormatter)
Prompt contributor that represents the conversation so far. Usually we will want to add messages from the conversation instead of formatting the conversation
-
infoString
String infoString(Boolean verbose, Integer indent)
-
getMessages
abstract List<Message> getMessages()
-
-
-
-