Class BailianMessage
java.lang.Object
io.agentscope.core.memory.bailian.BailianMessage
Represents a message in the Bailian Memory API format.
Messages are used for both adding memories and searching for relevant memories. Each message has a role (user or assistant) and content.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Jackson deserialization.BailianMessage(String role, String content) Creates a new BailianMessage with specified role and content. -
Method Summary
Modifier and TypeMethodDescriptionstatic BailianMessage.Builderbuilder()Creates a new builder for BailianMessage.Gets the content.getRole()Gets the role.voidsetContent(String content) Sets the content.voidSets the role.
-
Constructor Details
-
BailianMessage
public BailianMessage()Default constructor for Jackson deserialization. -
BailianMessage
Creates a new BailianMessage with specified role and content.- Parameters:
role- the role (e.g., "user", "assistant")content- the message content
-
-
Method Details
-
getRole
Gets the role.- Returns:
- the role
-
setRole
Sets the role.- Parameters:
role- the role
-
getContent
Gets the content.- Returns:
- the content
-
setContent
Sets the content.- Parameters:
content- the content
-
builder
Creates a new builder for BailianMessage.- Returns:
- a new Builder instance
-