Class MessageWindowChatMemoryConfigurationProperties
java.lang.Object
io.micronaut.langchain4j.store.memory.chat.MessageWindowChatMemoryConfigurationProperties
- All Implemented Interfaces:
MessageWindowChatMemoryConfiguration
@Internal
@ConfigurationProperties("langchain4j.chat-memory-store.message-window")
public class MessageWindowChatMemoryConfigurationProperties
extends Object
implements MessageWindowChatMemoryConfiguration
ConfigurationProperties
for MessageWindowChatMemoryConfiguration
.-
Field Summary
FieldsFields inherited from interface io.micronaut.langchain4j.store.memory.chat.MessageWindowChatMemoryConfiguration
DEFAULT_MAX_MESSAGES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Integer
void
setMaxMessages
(@NonNull Integer maxMessages) Sets the maximum number of messages to retain.
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
MessageWindowChatMemoryConfigurationProperties
public MessageWindowChatMemoryConfigurationProperties()
-
-
Method Details
-
getMaxMessages
- Specified by:
getMaxMessages
in interfaceMessageWindowChatMemoryConfiguration
- Returns:
- The maximum number of messages to retain. If there isn't enough space for a new message, the oldest one is evicted.
-
setMaxMessages
Sets the maximum number of messages to retain. Default value 20. If there isn't enough space for a new message, the oldest one is evicted.- Parameters:
maxMessages
- The maximum number of messages to retain.
-