Annotation Interface Ai.ChatMemoryWindow

Enclosing class:
Ai

@Target(TYPE) @Retention(RUNTIME) public static @interface Ai.ChatMemoryWindow
Annotation to specify a MessageWindowChatMemory for the service. This annotation is mutually exclusive with Ai.ChatMemory.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The window of the chat memory.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Id of the chat memory window, defaults to Service.Named.DEFAULT_NAME.
    Name qualifier of ChatMemoryStore, defaults to default of Lanchain4j (in-memory store).
  • Element Details

    • value

      int value
      The window of the chat memory.
      Returns:
      number of messages to keep in the chat window
    • id

      String id
      Id of the chat memory window, defaults to Service.Named.DEFAULT_NAME.
      Returns:
      id of the chat memory window
      Default:
      "@default"
    • store

      String store
      Name qualifier of ChatMemoryStore, defaults to default of Lanchain4j (in-memory store).
      Returns:
      name qualifier of chat memory store
      Default:
      "@default"