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 Details

  • Constructor Details

    • MessageWindowChatMemoryConfigurationProperties

      public MessageWindowChatMemoryConfigurationProperties()
  • Method Details

    • getMaxMessages

      @NonNull public @NonNull Integer getMaxMessages()
      Specified by:
      getMaxMessages in interface MessageWindowChatMemoryConfiguration
      Returns:
      The maximum number of messages to retain. If there isn't enough space for a new message, the oldest one is evicted.
    • setMaxMessages

      public void setMaxMessages(@NonNull @NonNull Integer maxMessages)
      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.