Files
letta-server/scripts/migrate_tools.py
Shubham Naik 5a743d1dc4 Add 'apps/core/' from commit 'ea2a7395f4023f5b9fab03e6273db3b64a1181d5'
git-subtree-dir: apps/core
git-subtree-mainline: a8963e11e7a5a0059acbc849ce768e1eee80df61
git-subtree-split: ea2a7395f4023f5b9fab03e6273db3b64a1181d5
2024-12-22 20:31:22 -08:00

18 lines
578 B
Python

from tqdm import tqdm
from letta.schemas.user import User
from letta.services.organization_manager import OrganizationManager
from letta.services.tool_manager import ToolManager
def deprecated_tool():
return "this is a deprecated tool, please remove it from your tools list"
orgs = OrganizationManager().list_organizations(cursor=None, limit=5000)
for org in tqdm(orgs):
if org.name != "default":
fake_user = User(id="user-00000000-0000-4000-8000-000000000000", name="fake", organization_id=org.id)
ToolManager().upsert_base_tools(actor=fake_user)