AutoGPTMemory#
- class langchain_experimental.autonomous_agents.autogpt.memory.AutoGPTMemory[source]#
Bases:
BaseChatMemory
Memory for AutoGPT.
- param chat_memory: BaseChatMessageHistory [Optional]#
- param input_key: str | None = None#
- param output_key: str | None = None#
- param retriever: VectorStoreRetriever [Required]#
VectorStoreRetriever object to connect to.
- param return_messages: bool = False#
- async aclear() None #
Clear memory contents.
- Return type:
None
- async aload_memory_variables(
- inputs: dict[str, Any],
Async return key-value pairs given the text input to the chain.
- Parameters:
inputs (dict[str, Any]) – The inputs to the chain.
- Returns:
A dictionary of key-value pairs.
- Return type:
dict[str, Any]
- async asave_context(
- inputs: dict[str, Any],
- outputs: dict[str, str],
Save context from this conversation to buffer.
- Parameters:
inputs (dict[str, Any])
outputs (dict[str, str])
- Return type:
None
- clear() None #
Clear memory contents.
- Return type:
None
- load_memory_variables(
- inputs: Dict[str, Any],
Return key-value pairs given the text input to the chain.
- Parameters:
inputs (Dict[str, Any]) – The inputs to the chain.
- Returns:
A dictionary of key-value pairs.
- Return type:
Dict[str, Any]
- save_context(
- inputs: dict[str, Any],
- outputs: dict[str, str],
Save context from this conversation to buffer.
- Parameters:
inputs (dict[str, Any])
outputs (dict[str, str])
- Return type:
None
- property memory_variables: List[str]#
The string keys this memory class will add to chain inputs.