public interface ChatMemory
ChatMemory helps with retaining messages in the conversation and ensuring they fit within LLM's context window.| Modifier and Type | Method and Description |
|---|---|
void |
add(ChatMessage message)
Adds a message to the chat memory.
|
void |
clear()
Clears the chat memory.
|
Object |
id() |
List<ChatMessage> |
messages()
Retrieves messages from the chat memory.
|
Object id()
ChatMemory.void add(ChatMessage message)
message - The ChatMessage to add.List<ChatMessage> messages()
ChatMessage objects that represent the current state of the chat memory.void clear()
Copyright © 2023. All rights reserved.