Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add core memory char limits to text shown in core memory #508

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions memgpt/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ def construct_system_with_memory(system, memory, memory_edit_timestamp, archival
[
system,
"\n",
f"### Memory [last modified: {memory_edit_timestamp}]",
f"### Memory [last modified: {memory_edit_timestamp.strip()}]",
cpacker marked this conversation as resolved.
Show resolved Hide resolved
f"{len(recall_memory) if recall_memory else 0} previous messages between you and the user are stored in recall memory (use functions to access them)",
f"{len(archival_memory) if archival_memory else 0} total memories you created are stored in archival memory (use functions to access them)",
"\nCore memory shown below (limited in size, additional information stored in archival / recall memory):",
"<persona>",
f'<persona characters="{len(memory.persona)}/{memory.persona_char_limit}">',
memory.persona,
"</persona>",
"<human>",
f'<human characters="{len(memory.human)}/{memory.human_char_limit}">',
memory.human,
"</human>",
]
Expand Down
Loading