letta-nightly 0.5.1.dev20241030104135__py3-none-any.whl → 0.5.1.dev20241031104107__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of letta-nightly might be problematic. Click here for more details.

Files changed (32) hide show
  1. letta/agent.py +41 -2
  2. letta/client/client.py +85 -15
  3. letta/client/streaming.py +3 -0
  4. letta/constants.py +3 -0
  5. letta/functions/functions.py +4 -5
  6. letta/functions/schema_generator.py +4 -3
  7. letta/helpers/__init__.py +1 -0
  8. letta/helpers/tool_rule_solver.py +115 -0
  9. letta/llm_api/helpers.py +3 -1
  10. letta/llm_api/llm_api_tools.py +1 -2
  11. letta/llm_api/openai.py +5 -0
  12. letta/metadata.py +43 -1
  13. letta/orm/tool.py +0 -3
  14. letta/schemas/agent.py +5 -5
  15. letta/schemas/letta_response.py +1 -1
  16. letta/schemas/tool.py +4 -6
  17. letta/schemas/tool_rule.py +25 -0
  18. letta/server/rest_api/app.py +1 -5
  19. letta/server/rest_api/routers/v1/organizations.py +2 -2
  20. letta/server/server.py +2 -38
  21. letta/server/static_files/assets/{index-d6b3669a.js → index-b82c8d7c.js} +1 -1
  22. letta/server/static_files/index.html +1 -1
  23. letta/services/tool_manager.py +21 -4
  24. {letta_nightly-0.5.1.dev20241030104135.dist-info → letta_nightly-0.5.1.dev20241031104107.dist-info}/METADATA +1 -1
  25. {letta_nightly-0.5.1.dev20241030104135.dist-info → letta_nightly-0.5.1.dev20241031104107.dist-info}/RECORD +28 -29
  26. letta/server/rest_api/admin/__init__.py +0 -0
  27. letta/server/rest_api/admin/agents.py +0 -21
  28. letta/server/rest_api/admin/tools.py +0 -82
  29. letta/server/rest_api/admin/users.py +0 -98
  30. {letta_nightly-0.5.1.dev20241030104135.dist-info → letta_nightly-0.5.1.dev20241031104107.dist-info}/LICENSE +0 -0
  31. {letta_nightly-0.5.1.dev20241030104135.dist-info → letta_nightly-0.5.1.dev20241031104107.dist-info}/WHEEL +0 -0
  32. {letta_nightly-0.5.1.dev20241030104135.dist-info → letta_nightly-0.5.1.dev20241031104107.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  letta/__init__.py,sha256=zlZXKr0iQIsC7FTkN9fjTvAgQGPXyr0nnkMJ7_OE1D0,1014
2
2
  letta/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
3
- letta/agent.py,sha256=rU1XEgE-sIXGVq7oCSE1oeEJXezTIUGcPGCGYAbCJKY,72833
3
+ letta/agent.py,sha256=uMU0_5XEitgYyfN5R53EzBnjajSCxzM5OTuEtOTmHFg,74850
4
4
  letta/agent_store/chroma.py,sha256=upR5zGnGs6I6btulEYbiZdGG87BgKjxUJOQZ4Y-RQ_M,12492
5
5
  letta/agent_store/db.py,sha256=mTY3YWUs5n17479GMeTmxN8DAyzbBweVcypyNsK_slg,23435
6
6
  letta/agent_store/lancedb.py,sha256=i63d4VZwj9UIOTNs5f0JZ_r5yZD-jKWz4FAH4RMpXOE,5104
@@ -13,11 +13,11 @@ letta/cli/cli.py,sha256=i6wFBaX8-WwZ6nl_T0FFptfozlnYEBM7RcShwBl-qfw,16106
13
13
  letta/cli/cli_config.py,sha256=ynsezKawQ0l95rymlv-AJ3QjbqiyaXZyuzsDfBYwMwg,8537
14
14
  letta/cli/cli_load.py,sha256=x4L8s15GwIW13xrhKYFWHo_y-IVGtoPDHWWKcHDRP10,4587
15
15
  letta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- letta/client/client.py,sha256=3tZfSKez9uCCpcItjtUJ0CMpRwoTSA-CGvX7I4pNBG4,92340
17
- letta/client/streaming.py,sha256=bfWlUu7z7EoPfKxBqIarYxGKyrL7Pj79BlliToqcCgI,4592
16
+ letta/client/client.py,sha256=tOgW1i8srCWQgI_rwd1ketWL1sxiFW4o5M82fUvlnKA,95334
17
+ letta/client/streaming.py,sha256=Hh5pjlyrdCuO2V75ZCxSSOCPd3BmHdKFGaIUJC6fBp0,4775
18
18
  letta/client/utils.py,sha256=OJlAKWrldc4I6M1WpcTWNtPJ4wfxlzlZqWLfCozkFtI,2872
19
19
  letta/config.py,sha256=eK-ip06ELHNYriInkgfidDvJxQ2tD1u49I-VLXB87nE,18929
20
- letta/constants.py,sha256=hCV9OyPzv2bUBJNmQk9Ap1YBeUmgXquxnF50t5ApuuQ,6437
20
+ letta/constants.py,sha256=G7YPJ9z93h727kAP2o4wPE-F5EG2-zhtSXTF92tKe80,6513
21
21
  letta/credentials.py,sha256=D9mlcPsdDWlIIXQQD8wSPE9M_QvsRrb0p3LB5i9OF5Q,5806
22
22
  letta/data_sources/connectors.py,sha256=qO81ASB6V-vDPthfHYtZiyqcQDQPTT0NuD8hVwC6xI0,9907
23
23
  letta/data_sources/connectors_helper.py,sha256=2TQjCt74fCgT5sw1AP8PalDEk06jPBbhrPG4HVr-WLs,3371
@@ -26,9 +26,11 @@ letta/errors.py,sha256=cDOo4cSYL-LA0w0b0GdsxXd5k2I1LLOY8nhtXk9YqYs,2875
26
26
  letta/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  letta/functions/function_sets/base.py,sha256=N4QmOjL6gDEyOg67ocF6zVKM-NquTo-yXG_T8r18buA,6440
28
28
  letta/functions/function_sets/extras.py,sha256=Jik3UiDqYTm4Lam1XPTvuVjvgUHwIAhopsnbmVhGMBg,4732
29
- letta/functions/functions.py,sha256=DIF4m_IxPvitSyqrXRiBUgNnI0P7P0HsUZ7qk6j5vAM,4201
29
+ letta/functions/functions.py,sha256=n-g5qx_-5BBMEYpa-lrzeHIUbuXImPO4ABrFZTPZKMQ,4102
30
30
  letta/functions/helpers.py,sha256=JU3e5xkkTVx4EevBmtyCRnidf0ncAeASvH2ZT_aBvPc,9905
31
- letta/functions/schema_generator.py,sha256=GzNusbElWeaVWctFfHX9i93tiqNW16wMeS5ClKIal3A,7090
31
+ letta/functions/schema_generator.py,sha256=M6cLDnoJOARd5OkAQUeGxjpLUQtMu4WEztcIkZFFh-I,7098
32
+ letta/helpers/__init__.py,sha256=p0luQ1Oe3Skc6sH4O58aHHA3Qbkyjifpuq0DZ1GAY0U,59
33
+ letta/helpers/tool_rule_solver.py,sha256=rcl8LBLbK5Hpxgf0gNMSV2uqWuVTuJNFJdCDsR5Eyd8,4758
32
34
  letta/humans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
35
  letta/humans/examples/basic.txt,sha256=Lcp8YESTWvOJgO4Yf_yyQmgo5bKakeB1nIVrwEGG6PA,17
34
36
  letta/humans/examples/cs_phd.txt,sha256=9C9ZAV_VuG7GB31ksy3-_NAyk8rjE6YtVOkhp08k1xw,297
@@ -39,10 +41,10 @@ letta/llm_api/azure_openai.py,sha256=Y1HKPog1XzM_f7ujUK_Gv2zQkoy5pU-1bKiUnvSxSrs
39
41
  letta/llm_api/azure_openai_constants.py,sha256=oXtKrgBFHf744gyt5l1thILXgyi8NDNUrKEa2GGGpjw,278
40
42
  letta/llm_api/cohere.py,sha256=vDRd-SUGp1t_JUIdwC3RkIhwMl0OY7n-tAU9uPORYkY,14826
41
43
  letta/llm_api/google_ai.py,sha256=3xZ074nSOCC22c15yerA5ngWzh0ex4wxeI-6faNbHPE,17708
42
- letta/llm_api/helpers.py,sha256=sGCmNA1U_7-AhRFgvT668jdp_xyzSliKQYbTvRR6O7c,9812
43
- letta/llm_api/llm_api_tools.py,sha256=RRczEZ3h_fxIJLXbw1UT5YZwdsr1gZD6HRPVA9qopmE,14787
44
+ letta/llm_api/helpers.py,sha256=KqkdjZWYghx4OPwLcHEC6ruc_z9DScbysw3VH4x9A0Q,9887
45
+ letta/llm_api/llm_api_tools.py,sha256=KFG2miI7KrDOIcOSgm2jwBIb3qvzYt2O_5UNjTbTsm8,14786
44
46
  letta/llm_api/mistral.py,sha256=fHdfD9ug-rQIk2qn8tRKay1U6w9maF11ryhKi91FfXM,1593
45
- letta/llm_api/openai.py,sha256=0hwAZhpjrmubYy549hvjzhw6zK_aBhSVuIQN0OsTq-w,23705
47
+ letta/llm_api/openai.py,sha256=o2I7yNyBMsW33MwQJMo2EWYTC5dLDdxfGmg-mQle6nA,23844
46
48
  letta/local_llm/README.md,sha256=hFJyw5B0TU2jrh9nb0zGZMgdH-Ei1dSRfhvPQG_NSoU,168
47
49
  letta/local_llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
50
  letta/local_llm/chat_completion_proxy.py,sha256=SiohxsjGTku4vOryOZx7I0t0xoO_sUuhXgoe62fKq3c,12995
@@ -83,7 +85,7 @@ letta/local_llm/webui/settings.py,sha256=gmLHfiOl1u4JmlAZU2d2O8YKF9lafdakyjwR_ft
83
85
  letta/log.py,sha256=QHquDnL7oUAvdKlAwUlCK9zXKDMUjrU9WA0bxnMsP0Y,2101
84
86
  letta/main.py,sha256=yHgM1lltQZvbE8k0QDQMmVyJiWEj07ZTOYIBHDxE_DQ,18709
85
87
  letta/memory.py,sha256=6q1x3-PY-PeXzAt6hvP-UF1ajvroPZ7XW-5nLy-JhMo,17657
86
- letta/metadata.py,sha256=vWxKnPlt6OM-Ir9UUaNwTis5eOLpss_o-GoilNl733g,27682
88
+ letta/metadata.py,sha256=B4B8f5WSqmUwIGU5MN6fyBdHwryxrr9y0cZWr_eq9pE,29168
87
89
  letta/o1_agent.py,sha256=LqATgTpkc02-nCH_F87EOvgxLjdjT9F07kdzj3zSdQg,3118
88
90
  letta/openai_backcompat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
91
  letta/openai_backcompat/openai_object.py,sha256=Y1ZS1sATP60qxJiOsjOP3NbwSzuzvkNAvb3DeuhM5Uk,13490
@@ -95,7 +97,7 @@ letta/orm/errors.py,sha256=somsGtotFlb3SDM6tKdZ5TDGwEEP3ppx47ICAvNMnkg,225
95
97
  letta/orm/mixins.py,sha256=hZJFYnmSGklryuAOypvVhMgXyU7pgatGEun-p-2f_Fc,2457
96
98
  letta/orm/organization.py,sha256=ccE0ShFWqWPdtXiCRkZCSeIERbtwU-a7AF99N3S6IRM,1468
97
99
  letta/orm/sqlalchemy_base.py,sha256=LuV-or0T8kdg2M0H7Y8KEIcaeKD1DkARzA-LgAGR4qU,7721
98
- letta/orm/tool.py,sha256=mVOgN2TdszQ5SM6cHqY9Rl6405ccB7mXrq_DHisA1WU,2179
100
+ letta/orm/tool.py,sha256=4cYKSoogfpH4O0wruIqU8vzEGgiCOL3gQfG5doSqpDw,2089
99
101
  letta/orm/user.py,sha256=69FU1rSXhlRJMaAUPYebxgFPn8UCQRU8TYUkjXLrALQ,1136
100
102
  letta/persistence_manager.py,sha256=LlLgEDpSafCPAiyKmuq0NvVAnfBkZo6TWbGIKYQjQBs,5200
101
103
  letta/personas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -122,7 +124,7 @@ letta/prompts/system/memgpt_modified_chat.txt,sha256=HOaPVurEftD8KsuwsclDgE2afIf
122
124
  letta/prompts/system/memgpt_modified_o1.txt,sha256=AxxYVjYLZwpZ6yfifh1SuPtwlJGWTcTVzw53QbkN-Ao,5492
123
125
  letta/providers.py,sha256=nWvTvVsZH1EE2aHAwihJvCIDJpgfeWAOUE_YK1x5Zj4,19635
124
126
  letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
- letta/schemas/agent.py,sha256=e69lAKJQYtx92w8tM9sdLdv1hDqZ_0V_qiUiQyI-uks,7138
127
+ letta/schemas/agent.py,sha256=nDHmJC45pgds-D50HNUYhTH5no3U-NKIqPBPTPAs14g,7191
126
128
  letta/schemas/api_key.py,sha256=u07yzzMn-hBAHZIIKbWY16KsgiFjSNR8lAghpMUo3_4,682
127
129
  letta/schemas/block.py,sha256=2_GftSIoTie6qHqUcZTfvN5bZT-p3goGcVx3TAuNOPQ,3936
128
130
  letta/schemas/embedding_config.py,sha256=1kD6NpiXeH4roVumxqDAKk7xt8SpXGWNhZs_XXUSlEU,2855
@@ -133,7 +135,7 @@ letta/schemas/job.py,sha256=605TWjUdNy5Rgoc7en_DX3Giz-I7sVTXiSRZqxL__d8,1543
133
135
  letta/schemas/letta_base.py,sha256=4QXFgyjCHqIagi8B6_4nmqb9eoJ52Y6aCxBxQpGX48M,2832
134
136
  letta/schemas/letta_message.py,sha256=RuVVtwFbi85yP3dXQxowofQ6cI2cO_CdGtgpHGQzgHc,6563
135
137
  letta/schemas/letta_request.py,sha256=_oiDshc_AoFWIfXRk2VX5-AxO5vDlyN-9r-gnyLj_30,1890
136
- letta/schemas/letta_response.py,sha256=_UJoO3UtC3F5DtQCHzdiGM1SHNPYPKvopIWqg8t5YZw,1564
138
+ letta/schemas/letta_response.py,sha256=Vn4HoMaNTcTqLU2QUdUFjhzyWr48AbHEtZXlTXBi390,1586
137
139
  letta/schemas/llm_config.py,sha256=eFA48vKBTO70qaob8pak2CWOH7TCQeqWuClkMBc2vbY,4172
138
140
  letta/schemas/memory.py,sha256=rNUxCs11nZf_gbKgkJ-c4FRHZVhqIfTyfD2nS5WP6oI,11490
139
141
  letta/schemas/message.py,sha256=DQxnRYrYgHXpTKfMzfS-bpCAe-BO_Rmcfc1Wf-4GHjw,33703
@@ -145,17 +147,14 @@ letta/schemas/openai/openai.py,sha256=Hilo5BiLAGabzxCwnwfzK5QrWqwYD8epaEKFa4Pwnd
145
147
  letta/schemas/organization.py,sha256=0MOUbaiDGTXkzTjaALLI2wj4E1bL5V_0jjI6jEgFKlA,635
146
148
  letta/schemas/passage.py,sha256=eYQMxD_XjHAi72jmqcGBU4wM4VZtSU0XK8uhQxxN3Ug,3563
147
149
  letta/schemas/source.py,sha256=hB4Ai6Nj8dFdbxv5_Qaf4uN_cmdGmnzgc-4QnHXcV3o,2562
148
- letta/schemas/tool.py,sha256=itC9jIwrCPeE-w70CbkaJ7l8ueA5C9Heq_bGNmKHUcc,9598
150
+ letta/schemas/tool.py,sha256=j1tMMx652RA8X9xOZm-TwqS0S2MAA58I8p_zgQHdFPA,9275
151
+ letta/schemas/tool_rule.py,sha256=dHEwVOZ40lMEVCrry7wlZM0IJo5SJrZqXKYpXe40bjY,778
149
152
  letta/schemas/usage.py,sha256=lvn1ooHwLEdv6gwQpw5PBUbcwn_gwdT6HA-fCiix6sY,817
150
153
  letta/schemas/user.py,sha256=toiA53UKB1hpH6k2xHyQNKVeDUoSB3RmLfxSwmKPAz4,1523
151
154
  letta/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
152
155
  letta/server/constants.py,sha256=yAdGbLkzlOU_dLTx0lKDmAnj0ZgRXCEaIcPJWO69eaE,92
153
156
  letta/server/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
154
- letta/server/rest_api/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
- letta/server/rest_api/admin/agents.py,sha256=cFNDU4Z8wGpcWXuo5aBgX6CcxLzPpTFYnTIaiF-3qvw,564
156
- letta/server/rest_api/admin/tools.py,sha256=HdXR_MRWkh3zMtb96Eaomp4rReNm3DirnXCNqAD7tNU,3093
157
- letta/server/rest_api/admin/users.py,sha256=B3KeVkPpXACFZUjjc6twDSxWO8sHLtBIaO61f1dpFU4,3493
158
- letta/server/rest_api/app.py,sha256=JNmDnvp9fP--hJPtPpEWgQT-14O1YOceZbWELr2vedA,6207
157
+ letta/server/rest_api/app.py,sha256=ADe99YtuSxH88xOX8Hs9TkgP_kusCNUOZ5YYXIqOIvs,6201
159
158
  letta/server/rest_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
160
159
  letta/server/rest_api/auth/index.py,sha256=fQBGyVylGSRfEMLQ17cZzrHd5Y1xiVylvPqH5Rl-lXQ,1378
161
160
  letta/server/rest_api/auth_token.py,sha256=725EFEIiNj4dh70hrSd94UysmFD8vcJLrTRfNHkzxDo,774
@@ -174,18 +173,18 @@ letta/server/rest_api/routers/v1/blocks.py,sha256=0WekE_yBD2U3jYgPxI0DCFjACWavCA
174
173
  letta/server/rest_api/routers/v1/health.py,sha256=pKCuVESlVOhGIb4VC4K-H82eZqfghmT6kvj2iOkkKuc,401
175
174
  letta/server/rest_api/routers/v1/jobs.py,sha256=a-j0v-5A0un0pVCOHpfeWnzpOWkVDQO6ti42k_qAlZY,2272
176
175
  letta/server/rest_api/routers/v1/llms.py,sha256=TcyvSx6MEM3je5F4DysL7ligmssL_pFlJaaO4uL95VY,877
177
- letta/server/rest_api/routers/v1/organizations.py,sha256=3XlHPUc6ZdMOVZNdarwDM8ZxYisoHunSZQ0ozzX5orU,2037
176
+ letta/server/rest_api/routers/v1/organizations.py,sha256=hCuni52aM1Gfmuu_BeodXAvTkfrvexEo_wZf8UtyaAM,2034
178
177
  letta/server/rest_api/routers/v1/sources.py,sha256=eY_pk9jRL2Y9yIZdsTjH6EuKsfH1neaTU15MKNL0dvw,8749
179
178
  letta/server/rest_api/routers/v1/tools.py,sha256=aVZcVxL68Oq8N6p3p_MsGrNxmnK3-UWAIHdVztFw_Nk,3794
180
179
  letta/server/rest_api/routers/v1/users.py,sha256=bxQ-YdevjDqmgNDfbSPAG_4KEVvPNBHD_-Lp1MdeMec,3374
181
180
  letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
182
181
  letta/server/rest_api/utils.py,sha256=GdHYCzXtbM5VCAYDPR0z5gnNZpRhwPld2BGZV7xT6cU,2924
183
- letta/server/server.py,sha256=HeIucHAaf6CpV0izHTnrMfQwDX-Lbs7j9DHYogZpLAc,80255
182
+ letta/server/server.py,sha256=FCe8TxplBSYlte2VB3zzS9AbEAOiHCfxiYEmHeXWn_o,78510
184
183
  letta/server/startup.sh,sha256=o2dY9wc5Ew1j_10U6dK2FYevAj79udZ-T969j5rG-a0,311
185
184
  letta/server/static_files/assets/index-3ab03d5b.css,sha256=OrA9W4iKJ5h2Wlr7GwdAT4wow0CM8hVit1yOxEL49Qw,54295
186
- letta/server/static_files/assets/index-d6b3669a.js,sha256=i1nHReU0RPnj-a5W0nNPV4Y9bQ0FOW0ztjMz8a2AE-Y,1821560
185
+ letta/server/static_files/assets/index-b82c8d7c.js,sha256=QfDdAVB28v1pMu5tic5YeNwelT3xLWGS2xmMswSrr3Y,1821578
187
186
  letta/server/static_files/favicon.ico,sha256=DezhLdFSbM8o81wCOZcV3riq7tFUOGQD4h6-vr-HuU0,342
188
- letta/server/static_files/index.html,sha256=GqyD2dyoR8pDu5Ky3la_-DFbAlCvFXd-qsb6ni4Ccoc,1198
187
+ letta/server/static_files/index.html,sha256=dClxQcj7Duon7qxC_hgwQlrSS6p-VJzh3in3dUF6Jvo,1198
189
188
  letta/server/static_files/memgpt_logo_transparent.png,sha256=7l6niNb4MlUILxLlUZPxIE1TEHj_Z9f9XDxoST3d7Vw,85383
190
189
  letta/server/utils.py,sha256=rRvW6L1lzau4u9boamiyZH54lf5tQ91ypXzUW9cfSPA,1667
191
190
  letta/server/ws_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -195,15 +194,15 @@ letta/server/ws_api/protocol.py,sha256=M_-gM5iuDBwa1cuN2IGNCG5GxMJwU2d3XW93XALv9
195
194
  letta/server/ws_api/server.py,sha256=C2Kv48PCwl46DQFb0ZP30s86KJLQ6dZk2AhWQEZn9pY,6004
196
195
  letta/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
197
196
  letta/services/organization_manager.py,sha256=wW4wOmKaqhHC7oTGWU38OO-dFtmRI0JVmq_k8gI1b0A,3658
198
- letta/services/tool_manager.py,sha256=RAY7mNGuFoVfWfxe4mOmmPp53Ghm1Wy1UtLFuUwKPhA,7082
197
+ letta/services/tool_manager.py,sha256=lU_U_6pfae7m5Xsn1R7g-Xb9rGIs1s7JXmirOPDGumg,7984
199
198
  letta/services/user_manager.py,sha256=5wjmnhLoxsc9FCKD0IPotfV24i_iCqmifOkhIBvshtc,4404
200
199
  letta/settings.py,sha256=yiYNmnYKj_BdTm0cBEIvQKYGU-lCmFntqsyVfRUy3_k,3411
201
200
  letta/streaming_interface.py,sha256=_FPUWy58j50evHcpXyd7zB1wWqeCc71NCFeWh_TBvnw,15736
202
201
  letta/streaming_utils.py,sha256=329fsvj1ZN0r0LpQtmMPZ2vSxkDBIUUwvGHZFkjm2I8,11745
203
202
  letta/system.py,sha256=buKYPqG5n2x41hVmWpu6JUpyd7vTWED9Km2_M7dLrvk,6960
204
203
  letta/utils.py,sha256=SXLEYhyp3gHyIjrxNIKNZZ5ittKo3KOj6zxgC_Trex0,31012
205
- letta_nightly-0.5.1.dev20241030104135.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
206
- letta_nightly-0.5.1.dev20241030104135.dist-info/METADATA,sha256=uGyx0kl-8ZxebvCtXGM5Ko0oQNo_hmgRGzuiO0DnPMc,10660
207
- letta_nightly-0.5.1.dev20241030104135.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
208
- letta_nightly-0.5.1.dev20241030104135.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
209
- letta_nightly-0.5.1.dev20241030104135.dist-info/RECORD,,
204
+ letta_nightly-0.5.1.dev20241031104107.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
205
+ letta_nightly-0.5.1.dev20241031104107.dist-info/METADATA,sha256=QYICEVYyQgO8qRnVRt6txqjhtKOTBiJJT0EXSilk_Tk,10660
206
+ letta_nightly-0.5.1.dev20241031104107.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
207
+ letta_nightly-0.5.1.dev20241031104107.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
208
+ letta_nightly-0.5.1.dev20241031104107.dist-info/RECORD,,
File without changes
@@ -1,21 +0,0 @@
1
- from typing import List
2
-
3
- from fastapi import APIRouter
4
-
5
- from letta.schemas.agent import AgentState
6
- from letta.server.rest_api.interface import QueuingInterface
7
- from letta.server.server import SyncServer
8
-
9
- router = APIRouter()
10
-
11
-
12
- def setup_agents_admin_router(server: SyncServer, interface: QueuingInterface):
13
- @router.get("/agents", tags=["agents"], response_model=List[AgentState])
14
- def get_all_agents():
15
- """
16
- Get a list of all agents in the database
17
- """
18
- interface.clear()
19
- return server.list_agents()
20
-
21
- return router
@@ -1,82 +0,0 @@
1
- from typing import List, Literal, Optional
2
-
3
- from fastapi import APIRouter, Body, HTTPException
4
- from pydantic import BaseModel, Field
5
-
6
- from letta.schemas.tool import Tool as ToolModel # TODO: modify
7
- from letta.server.rest_api.interface import QueuingInterface
8
- from letta.server.server import SyncServer
9
-
10
- router = APIRouter()
11
-
12
-
13
- class ListToolsResponse(BaseModel):
14
- tools: List[ToolModel] = Field(..., description="List of tools (functions).")
15
-
16
-
17
- class CreateToolRequest(BaseModel):
18
- json_schema: dict = Field(..., description="JSON schema of the tool.")
19
- source_code: str = Field(..., description="The source code of the function.")
20
- source_type: Optional[Literal["python"]] = Field(None, description="The type of the source code.")
21
- tags: Optional[List[str]] = Field(None, description="Metadata tags.")
22
-
23
-
24
- class CreateToolResponse(BaseModel):
25
- tool: ToolModel = Field(..., description="Information about the newly created tool.")
26
-
27
-
28
- def setup_tools_index_router(server: SyncServer, interface: QueuingInterface):
29
-
30
- @router.delete("/tools/{tool_name}", tags=["tools"])
31
- async def delete_tool(
32
- tool_name: str,
33
- # user_id: uuid.UUID = Depends(get_current_user_with_server), # TODO: add back when user-specific
34
- ):
35
- """
36
- Delete a tool by name
37
- """
38
- # Clear the interface
39
- interface.clear()
40
- # tool = server.ms.delete_tool(user_id=user_id, tool_name=tool_name) TODO: add back when user-specific
41
- server.ms.delete_tool(name=tool_name, user_id=None)
42
-
43
- @router.get("/tools/{tool_name}", tags=["tools"], response_model=ToolModel)
44
- async def get_tool(tool_name: str):
45
- """
46
- Get a tool by name
47
- """
48
- # Clear the interface
49
- interface.clear()
50
- # tool = server.ms.get_tool(user_id=user_id, tool_name=tool_name) TODO: add back when user-specific
51
- tool = server.ms.get_tool(tool_name=tool_name, user_id=None)
52
- if tool is None:
53
- # return 404 error
54
- raise HTTPException(status_code=404, detail=f"Tool with name {tool_name} not found.")
55
- return tool
56
-
57
- @router.get("/tools", tags=["tools"], response_model=ListToolsResponse)
58
- async def list_all_tools():
59
- """
60
- Get a list of all tools available to agents created by a user
61
- """
62
- # Clear the interface
63
- interface.clear()
64
- # tools = server.ms.list_tools(user_id=user_id) TODO: add back when user-specific
65
- tools = server.ms.list_tools(user_id=None)
66
- return ListToolsResponse(tools=tools)
67
-
68
- @router.post("/tools", tags=["tools"], response_model=ToolModel)
69
- async def create_tool(
70
- request: CreateToolRequest = Body(...),
71
- ):
72
- """
73
- Create a new tool
74
- """
75
- try:
76
- return server.create_tool(
77
- json_schema=request.json_schema, source_code=request.source_code, source_type=request.source_type, tags=request.tags
78
- )
79
- except Exception as e:
80
- raise HTTPException(status_code=500, detail=f"Failed to create tool: {e}")
81
-
82
- return router
@@ -1,98 +0,0 @@
1
- from typing import List, Optional
2
-
3
- from fastapi import APIRouter, Body, HTTPException, Query
4
-
5
- from letta.schemas.api_key import APIKey, APIKeyCreate
6
- from letta.schemas.user import User, UserCreate
7
- from letta.server.rest_api.interface import QueuingInterface
8
- from letta.server.server import SyncServer
9
-
10
- router = APIRouter()
11
-
12
-
13
- def setup_admin_router(server: SyncServer, interface: QueuingInterface):
14
- @router.get("/users", tags=["admin"], response_model=List[User])
15
- def get_all_users(cursor: Optional[str] = Query(None), limit: Optional[int] = Query(50)):
16
- """
17
- Get a list of all users in the database
18
- """
19
- try:
20
- # TODO: make this call a server function
21
- _, users = server.ms.get_all_users(cursor=cursor, limit=limit)
22
- except HTTPException:
23
- raise
24
- except Exception as e:
25
- raise HTTPException(status_code=500, detail=f"{e}")
26
- return users
27
-
28
- @router.post("/users", tags=["admin"], response_model=User)
29
- def create_user(request: UserCreate = Body(...)):
30
- """
31
- Create a new user in the database
32
- """
33
- try:
34
- user = server.user_manager.create_user(request)
35
- except HTTPException:
36
- raise
37
- except Exception as e:
38
- raise HTTPException(status_code=500, detail=f"{e}")
39
- return user
40
-
41
- @router.delete("/users", tags=["admin"], response_model=User)
42
- def delete_user(
43
- user_id: str = Query(..., description="The user_id key to be deleted."),
44
- ):
45
- # TODO make a soft deletion, instead of a hard deletion
46
- try:
47
- user = server.ms.get_user(user_id=user_id)
48
- if user is None:
49
- raise HTTPException(status_code=404, detail=f"User does not exist")
50
- server.ms.delete_user(user_id=user_id)
51
- except HTTPException:
52
- raise
53
- except Exception as e:
54
- raise HTTPException(status_code=500, detail=f"{e}")
55
- return user
56
-
57
- @router.post("/users/keys", tags=["admin"], response_model=APIKey)
58
- def create_new_api_key(request: APIKeyCreate = Body(...)):
59
- """
60
- Create a new API key for a user
61
- """
62
- try:
63
- api_key = server.create_api_key(request)
64
- except HTTPException:
65
- raise
66
- except Exception as e:
67
- raise HTTPException(status_code=500, detail=f"{e}")
68
- return api_key
69
-
70
- @router.get("/users/keys", tags=["admin"], response_model=List[APIKey])
71
- def get_api_keys(
72
- user_id: str = Query(..., description="The unique identifier of the user."),
73
- ):
74
- """
75
- Get a list of all API keys for a user
76
- """
77
- try:
78
- if server.ms.get_user(user_id=user_id) is None:
79
- raise HTTPException(status_code=404, detail=f"User does not exist")
80
- api_keys = server.ms.get_all_api_keys_for_user(user_id=user_id)
81
- except HTTPException:
82
- raise
83
- except Exception as e:
84
- raise HTTPException(status_code=500, detail=f"{e}")
85
- return api_keys
86
-
87
- @router.delete("/users/keys", tags=["admin"], response_model=APIKey)
88
- def delete_api_key(
89
- api_key: str = Query(..., description="The API key to be deleted."),
90
- ):
91
- try:
92
- return server.delete_api_key(api_key)
93
- except HTTPException:
94
- raise
95
- except Exception as e:
96
- raise HTTPException(status_code=500, detail=f"{e}")
97
-
98
- return router