feat: refactor agent memory representation and modify routes for editing blocks (#2094)

Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
This commit is contained in:
Sarah Wooders
2024-11-27 16:04:13 -08:00
committed by GitHub
parent 122faa78ea
commit 07bb536018
44 changed files with 1326 additions and 1219 deletions

View File

@@ -3,7 +3,7 @@ import uuid
from letta import create_client
from letta.schemas.letta_message import FunctionCallMessage
from letta.schemas.tool_rule import InitToolRule, TerminalToolRule, ToolRule
from letta.schemas.tool_rule import ChildToolRule, InitToolRule, TerminalToolRule
from tests.helpers.endpoints_helper import (
assert_invoked_send_message_with_keyword,
setup_agent,
@@ -100,10 +100,10 @@ def main():
# 3. Create the tool rules. It must be called in this order, or there will be an error thrown.
tool_rules = [
InitToolRule(tool_name="first_secret_word"),
ToolRule(tool_name="first_secret_word", children=["second_secret_word"]),
ToolRule(tool_name="second_secret_word", children=["third_secret_word"]),
ToolRule(tool_name="third_secret_word", children=["fourth_secret_word"]),
ToolRule(tool_name="fourth_secret_word", children=["send_message"]),
ChildToolRule(tool_name="first_secret_word", children=["second_secret_word"]),
ChildToolRule(tool_name="second_secret_word", children=["third_secret_word"]),
ChildToolRule(tool_name="third_secret_word", children=["fourth_secret_word"]),
ChildToolRule(tool_name="fourth_secret_word", children=["send_message"]),
TerminalToolRule(tool_name="send_message"),
]