BaseChatMemory class abstract base

Base interface for chat memory.

Implemented types

Constructors

BaseChatMemory({required BaseChatMessageHistory chatHistory, String? inputKey, String? outputKey, bool returnMessages = false})
Base interface for chat memory.

Properties

chatHistory BaseChatMessageHistory
The chat history.
final
hashCode int
The hash code for this object.
no setterinherited
inputKey String?
The input key to use for the chat history.
final
memoryKeys Set<String>
Input keys this memory class will load dynamically to the prompt.
no setterinherited
outputKey String?
The output key to use for the chat history.
final
returnMessages bool
If true, when loadMemoryVariables is called, it will return ChatMessage objects. If false, it will return a String representation of the messages.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clear memory contents.
override
loadMemoryVariables([MemoryInputValues values = const {}]) Future<MemoryVariables>
Returns key-value pairs given the MemoryInputValues.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveContext({required MemoryInputValues inputValues, required MemoryOutputValues outputValues}) Future<void>
Save the context of this model run to memory.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited