feat: Move blocks to ORM model (#1980)

Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
This commit is contained in:
Matthew Zhou
2024-11-19 11:32:33 -08:00
committed by GitHub
parent d890e55991
commit 2bb3baf060
20 changed files with 431 additions and 398 deletions

View File

@@ -588,13 +588,13 @@ def test_shared_blocks(client: Union[LocalClient, RESTClient], agent: AgentState
# _reset_config()
# create a block
block = client.create_block(label="human", text="username: sarah")
block = client.create_block(label="human", value="username: sarah")
# create agents with shared block
from letta.schemas.memory import BasicBlockMemory
persona1_block = client.create_block(label="persona", text="you are agent 1")
persona2_block = client.create_block(label="persona", text="you are agent 2")
persona1_block = client.create_block(label="persona", value="you are agent 1")
persona2_block = client.create_block(label="persona", value="you are agent 2")
# create agnets
agent_state1 = client.create_agent(name="agent1", memory=BasicBlockMemory(blocks=[block, persona1_block]))