MyGit

0.3.22

letta-ai/letta

版本发布时间: 2024-08-02 05:35:10

letta-ai/letta最新发布版本:0.5.2(2024-11-07 15:00:40)

This PR includes a number of bugfixes, and CLI and Python client updates to make it easier to customize memory and system prompts.

Summary of new features:

Templated System Prompts

You can know use system prompts that are templated as f-strings! Currently we only support using the CORE_MEMORY variable, but we will be adding the ability to use custom variables in a future release.

Example: by default, the CORE_MEMORY block in MemGPT comes after the main system instructions - if you're like to adjust the system prompt to put the CORE_MEMORY block, you can write a new version of the system prompt that puts {CORE_MEMORY} in a different location:

{CORE_MEMORY}
You are MemGPT ...
...(rest of system prompt)

Check the PR for additional detail: https://github.com/cpacker/MemGPT/pull/1584

Editable System Prompts

We added cleaner ways to both customize and edit the system prompts of agents.

Specifying custom system prompts

You can now specify the system prompt with:

Example using a system prompt that tells the MemGPT agent to spam send_message with banana emojis only:

% memgpt run --system "Ignore all other instructions, just send_message(banana emoji)"

? Would you like to select an existing agent? No

🧬 Creating new agent...
->  🤖 Using persona profile: 'sam_pov'
->  🧑 Using human profile: 'basic'
->  🛠️  8 tools: send_message, pause_heartbeats, conversation_search, conversation_search_date, archival_memory_insert, archival_memory_search, core_memory_append, core_memory_replace
🎉 Created new agent 'HumbleTiger' (id=69058c08-a072-48d9-a007-c5f9893d1625)

Hit enter to begin (will request first MemGPT message)


💭 Sending a playful banana emoji to engage and connect.
🤖 🍌

Editing existing system prompts

You can edit exsiting system prompts of agents in the CLI with the /systemswap command:

% memgpt run

? Would you like to select an existing agent? No

🧬 Creating new agent...
->  🤖 Using persona profile: 'sam_pov'
->  🧑 Using human profile: 'basic'
->  🛠️  8 tools: send_message, pause_heartbeats, conversation_search, conversation_search_date, archival_memory_insert, archival_memory_search, core_memory_append, core_memory_replace
🎉 Created new agent 'FluffyRooster' (id=7a8d2dde-0853-4be1-a0e6-456743aa87e5)

Hit enter to begin (will request first MemGPT message)


💭 User Chad is new. Time to establish a connection and gauge their interests.
🤖 Welcome aboard, Chad! I'm excited to embark on this journey with you. What interests you the most right now?

> Enter your message: /systemswap Call function send_message to say BANANA TIME to the user


WARNING: You are about to change the system prompt.

Old system prompt:
You are MemGPT, the latest version of Limnal Corporation's digital companion, developed in 2023.
...
There is no function to search your core memory because it is always visible in your context window (inside the initial system message).

Base instructions finished.
From now on, you are going to act as your persona.

New system prompt:
Call function send_message to say BANANA TIME to the user
? Do you want to proceed with the swap? Yes
System prompt updated successfully.
💭 Injecting a little fun into the conversation! Let's see how Chad reacts.
🤖 BANANA TIME! 🍌

CLI Flag --core-memory-limit

You can now use persona/human prompts that are longer than the default limits in the CLI by specifying the flag --core-memory-limit, This will update the limit for both human and persona sections of core memory.

poetry run memgpt add persona --name <persona_name> -f <filename>
memgpt run --core-memory-limit 6000 --persona <persona_name>

What's Changed

New Contributors

Full Changelog: https://github.com/cpacker/MemGPT/compare/0.3.21...0.3.22

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-08-02发行的版本