feat: move agent_id from query param to path variable and remove unus… (#1094)

Co-authored-by: cpacker <packercharles@gmail.com>
This commit is contained in:
Robin Goetz
2024-03-05 23:28:03 +01:00
committed by GitHub
parent 1ada95ce5d
commit 16fa71b88e
5 changed files with 22 additions and 27 deletions

View File

@@ -1,7 +1,7 @@
import os
from memgpt.migrate import migrate_all_agents, migrate_all_sources
from memgpt.config import MemGPTConfig
from .utils import wipe_config
from .utils import wipe_config, create_config
from memgpt.server.server import SyncServer
import shutil
import uuid
@@ -9,6 +9,10 @@ import uuid
def test_migrate_0211():
wipe_config()
if os.getenv("OPENAI_API_KEY"):
create_config("openai")
else:
create_config("memgpt_hosted")
data_dir = "tests/data/memgpt-0.2.11"
tmp_dir = f"tmp_{str(uuid.uuid4())}"

View File

@@ -17,12 +17,12 @@ agent_obj = None
def create_test_agent():
"""Create a test agent that we can call functions on"""
wipe_config()
global client
if os.getenv("OPENAI_API_KEY"):
create_config("openai")
else:
create_config("memgpt_hosted")
global client
client = create_client()
agent_state = client.create_agent(
name=test_agent_name,