working_memory
WorkingMemory
Bases: BaseModelDict
Cat's volatile memory.
Handy class that behaves like a dict
to store temporary custom data.
Returns:
Type | Description |
---|---|
dict[str, list]
|
Default instance is a dictionary with |
Notes
The constructor instantiates a dictionary with a history
key set to an empty list that is further used to store
the conversation turns between the Human and the AI.
Source code in cat/memory/working_memory.py
update_conversation_history(who, message, why={})
Update the conversation history.
The methods append to the history key the last three conversation turns.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
who |
str
|
Who said the message. Can either be |
required |
message |
str
|
The message said. |
required |