Skip to content

Default memory

DefaultMemory

Bases: ChatMemory

The AFAF default memory module.

Source code in agentuniverse/agent/memory/default/default_memory.py
Python
class DefaultMemory(ChatMemory):
    """The AFAF default memory module."""

    def __init__(self, **kwargs):
        """The __init__ method.

        Some parameters, such as name/description/type/memory_key,
        are injected into this class by the default_memory.yaml configuration.


        Args:
            llm (LLM): the LLM instance used by this memory.
            default memory uses OpenAILLM(gpt-3.5-turbo) object as the memory llm.
        """
        super().__init__(**kwargs)
        self.llm = OpenAILLM(model_name="gpt-3.5-turbo")

__init__(**kwargs)

The init method.

Some parameters, such as name/description/type/memory_key, are injected into this class by the default_memory.yaml configuration.

Parameters:

Name Type Description Default
llm LLM

the LLM instance used by this memory.

required
Source code in agentuniverse/agent/memory/default/default_memory.py
Python
def __init__(self, **kwargs):
    """The __init__ method.

    Some parameters, such as name/description/type/memory_key,
    are injected into this class by the default_memory.yaml configuration.


    Args:
        llm (LLM): the LLM instance used by this memory.
        default memory uses OpenAILLM(gpt-3.5-turbo) object as the memory llm.
    """
    super().__init__(**kwargs)
    self.llm = OpenAILLM(model_name="gpt-3.5-turbo")