diff --git a/memgpt/schemas/memory.py b/memgpt/schemas/memory.py index 35313733..ea15356a 100644 --- a/memgpt/schemas/memory.py +++ b/memgpt/schemas/memory.py @@ -25,10 +25,10 @@ class Memory(BaseModel, validate_assignment=True): # Memory.template is a Jinja2 template for compiling memory module into a prompt string. prompt_template: str = Field( - default="{% for section, block in memory.items() %}" - '<{{ section }} characters="{{ block.value|length }}/{{ block.limit }}">\n' + default="{% for block in memory.values() %}" + '<{{ block.name }} characters="{{ block.value|length }}/{{ block.limit }}">\n' "{{ block.value }}\n" - "" + "" "{% if not loop.last %}\n{% endif %}" "{% endfor %}", description="Jinja2 template for compiling memory blocks into a prompt string",