letta-nightly 0.5.1.dev20241031104107__py3-none-any.whl → 0.5.1.dev20241102104033__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.
- letta/client/client.py +23 -8
- letta/constants.py +0 -1
- letta/orm/__init__.py +4 -0
- letta/orm/sqlalchemy_base.py +10 -1
- letta/schemas/agent.py +1 -1
- letta/schemas/letta_response.py +2 -2
- letta/server/rest_api/app.py +10 -0
- letta/server/rest_api/routers/v1/agents.py +16 -3
- letta/server/rest_api/routers/v1/tools.py +12 -0
- letta/server/server.py +6 -6
- letta/server/startup.sh +3 -0
- letta/server/static_files/assets/{index-b82c8d7c.js → index-9fa459a2.js} +66 -69
- letta/server/static_files/index.html +1 -1
- letta/services/tool_manager.py +35 -20
- {letta_nightly-0.5.1.dev20241031104107.dist-info → letta_nightly-0.5.1.dev20241102104033.dist-info}/METADATA +1 -1
- {letta_nightly-0.5.1.dev20241031104107.dist-info → letta_nightly-0.5.1.dev20241102104033.dist-info}/RECORD +19 -19
- {letta_nightly-0.5.1.dev20241031104107.dist-info → letta_nightly-0.5.1.dev20241102104033.dist-info}/LICENSE +0 -0
- {letta_nightly-0.5.1.dev20241031104107.dist-info → letta_nightly-0.5.1.dev20241102104033.dist-info}/WHEEL +0 -0
- {letta_nightly-0.5.1.dev20241031104107.dist-info → letta_nightly-0.5.1.dev20241102104033.dist-info}/entry_points.txt +0 -0
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
</script>
|
|
32
|
-
<script type="module" crossorigin src="/assets/index-
|
|
32
|
+
<script type="module" crossorigin src="/assets/index-9fa459a2.js"></script>
|
|
33
33
|
<link rel="stylesheet" href="/assets/index-3ab03d5b.css">
|
|
34
34
|
</head>
|
|
35
35
|
<body>
|
letta/services/tool_manager.py
CHANGED
|
@@ -18,6 +18,14 @@ from letta.utils import enforce_types
|
|
|
18
18
|
class ToolManager:
|
|
19
19
|
"""Manager class to handle business logic related to Tools."""
|
|
20
20
|
|
|
21
|
+
BASE_TOOL_NAMES = [
|
|
22
|
+
"send_message",
|
|
23
|
+
"conversation_search",
|
|
24
|
+
"conversation_search_date",
|
|
25
|
+
"archival_memory_insert",
|
|
26
|
+
"archival_memory_search",
|
|
27
|
+
]
|
|
28
|
+
|
|
21
29
|
def __init__(self):
|
|
22
30
|
# Fetching the db_context similarly as in OrganizationManager
|
|
23
31
|
from letta.server.server import db_context
|
|
@@ -137,8 +145,9 @@ class ToolManager:
|
|
|
137
145
|
raise ValueError(f"Tool with id {tool_id} not found.")
|
|
138
146
|
|
|
139
147
|
@enforce_types
|
|
140
|
-
def
|
|
141
|
-
"""Add default tools in
|
|
148
|
+
def add_base_tools(self, actor: PydanticUser) -> List[PydanticTool]:
|
|
149
|
+
"""Add default tools in base.py"""
|
|
150
|
+
module_name = "base"
|
|
142
151
|
full_module_name = f"letta.functions.function_sets.{module_name}"
|
|
143
152
|
try:
|
|
144
153
|
module = importlib.import_module(full_module_name)
|
|
@@ -155,22 +164,28 @@ class ToolManager:
|
|
|
155
164
|
warnings.warn(err)
|
|
156
165
|
|
|
157
166
|
# create tool in db
|
|
167
|
+
tools = []
|
|
158
168
|
for name, schema in functions_to_schema.items():
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
169
|
+
if name in self.BASE_TOOL_NAMES:
|
|
170
|
+
# print([str(inspect.getsource(line)) for line in schema["imports"]])
|
|
171
|
+
source_code = inspect.getsource(schema["python_function"])
|
|
172
|
+
tags = [module_name]
|
|
173
|
+
if module_name == "base":
|
|
174
|
+
tags.append("letta-base")
|
|
175
|
+
|
|
176
|
+
# create to tool
|
|
177
|
+
tools.append(
|
|
178
|
+
self.create_or_update_tool(
|
|
179
|
+
ToolCreate(
|
|
180
|
+
name=name,
|
|
181
|
+
tags=tags,
|
|
182
|
+
source_type="python",
|
|
183
|
+
module=schema["module"],
|
|
184
|
+
source_code=source_code,
|
|
185
|
+
json_schema=schema["json_schema"],
|
|
186
|
+
),
|
|
187
|
+
actor=actor,
|
|
188
|
+
)
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
return tools
|
|
@@ -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=
|
|
16
|
+
letta/client/client.py,sha256=H3BfhxEAW852mFsC6i5HXm50IkfU2I1dlS7KL1DNZvw,95824
|
|
17
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=
|
|
20
|
+
letta/constants.py,sha256=y0xZ9dxN4i0mBO5dFSakFPvWfLXlJPi2l5d8S5vv7cY,6487
|
|
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
|
|
@@ -90,13 +90,13 @@ letta/o1_agent.py,sha256=LqATgTpkc02-nCH_F87EOvgxLjdjT9F07kdzj3zSdQg,3118
|
|
|
90
90
|
letta/openai_backcompat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
91
|
letta/openai_backcompat/openai_object.py,sha256=Y1ZS1sATP60qxJiOsjOP3NbwSzuzvkNAvb3DeuhM5Uk,13490
|
|
92
92
|
letta/orm/__all__.py,sha256=2gh2MZTkA3Hw67VWVKK3JIStJOqTeLdpCvYSVYNeEDA,692
|
|
93
|
-
letta/orm/__init__.py,sha256=
|
|
93
|
+
letta/orm/__init__.py,sha256=J2GZpfXQunxU0ChavjkhoaSruluRFrLYknXD2m0BP_g,144
|
|
94
94
|
letta/orm/base.py,sha256=uK56wXg4Hv5jGuBsThSgmlFdl0e2u4VGiTX4RiRqTK4,2671
|
|
95
95
|
letta/orm/enums.py,sha256=KfHcFt_fR6GUmSlmfsa-TetvmuRxGESNve8MStRYW64,145
|
|
96
96
|
letta/orm/errors.py,sha256=somsGtotFlb3SDM6tKdZ5TDGwEEP3ppx47ICAvNMnkg,225
|
|
97
97
|
letta/orm/mixins.py,sha256=hZJFYnmSGklryuAOypvVhMgXyU7pgatGEun-p-2f_Fc,2457
|
|
98
98
|
letta/orm/organization.py,sha256=ccE0ShFWqWPdtXiCRkZCSeIERbtwU-a7AF99N3S6IRM,1468
|
|
99
|
-
letta/orm/sqlalchemy_base.py,sha256=
|
|
99
|
+
letta/orm/sqlalchemy_base.py,sha256=BPnegSQxW0SVnvje4H2441COBHfO30Tkwi2vG-9gwjY,8288
|
|
100
100
|
letta/orm/tool.py,sha256=4cYKSoogfpH4O0wruIqU8vzEGgiCOL3gQfG5doSqpDw,2089
|
|
101
101
|
letta/orm/user.py,sha256=69FU1rSXhlRJMaAUPYebxgFPn8UCQRU8TYUkjXLrALQ,1136
|
|
102
102
|
letta/persistence_manager.py,sha256=LlLgEDpSafCPAiyKmuq0NvVAnfBkZo6TWbGIKYQjQBs,5200
|
|
@@ -124,7 +124,7 @@ letta/prompts/system/memgpt_modified_chat.txt,sha256=HOaPVurEftD8KsuwsclDgE2afIf
|
|
|
124
124
|
letta/prompts/system/memgpt_modified_o1.txt,sha256=AxxYVjYLZwpZ6yfifh1SuPtwlJGWTcTVzw53QbkN-Ao,5492
|
|
125
125
|
letta/providers.py,sha256=nWvTvVsZH1EE2aHAwihJvCIDJpgfeWAOUE_YK1x5Zj4,19635
|
|
126
126
|
letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
|
-
letta/schemas/agent.py,sha256=
|
|
127
|
+
letta/schemas/agent.py,sha256=erAIm5wSzb7h9eWiYPMyuiH9J45dQXa5bz2kxde82j0,7210
|
|
128
128
|
letta/schemas/api_key.py,sha256=u07yzzMn-hBAHZIIKbWY16KsgiFjSNR8lAghpMUo3_4,682
|
|
129
129
|
letta/schemas/block.py,sha256=2_GftSIoTie6qHqUcZTfvN5bZT-p3goGcVx3TAuNOPQ,3936
|
|
130
130
|
letta/schemas/embedding_config.py,sha256=1kD6NpiXeH4roVumxqDAKk7xt8SpXGWNhZs_XXUSlEU,2855
|
|
@@ -135,7 +135,7 @@ letta/schemas/job.py,sha256=605TWjUdNy5Rgoc7en_DX3Giz-I7sVTXiSRZqxL__d8,1543
|
|
|
135
135
|
letta/schemas/letta_base.py,sha256=4QXFgyjCHqIagi8B6_4nmqb9eoJ52Y6aCxBxQpGX48M,2832
|
|
136
136
|
letta/schemas/letta_message.py,sha256=RuVVtwFbi85yP3dXQxowofQ6cI2cO_CdGtgpHGQzgHc,6563
|
|
137
137
|
letta/schemas/letta_request.py,sha256=_oiDshc_AoFWIfXRk2VX5-AxO5vDlyN-9r-gnyLj_30,1890
|
|
138
|
-
letta/schemas/letta_response.py,sha256=
|
|
138
|
+
letta/schemas/letta_response.py,sha256=ClI0LKyhMVI0N5CSnTAbcHaw7simkyrUTKYX0fr0qzw,1610
|
|
139
139
|
letta/schemas/llm_config.py,sha256=eFA48vKBTO70qaob8pak2CWOH7TCQeqWuClkMBc2vbY,4172
|
|
140
140
|
letta/schemas/memory.py,sha256=rNUxCs11nZf_gbKgkJ-c4FRHZVhqIfTyfD2nS5WP6oI,11490
|
|
141
141
|
letta/schemas/message.py,sha256=DQxnRYrYgHXpTKfMzfS-bpCAe-BO_Rmcfc1Wf-4GHjw,33703
|
|
@@ -154,7 +154,7 @@ letta/schemas/user.py,sha256=toiA53UKB1hpH6k2xHyQNKVeDUoSB3RmLfxSwmKPAz4,1523
|
|
|
154
154
|
letta/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
155
155
|
letta/server/constants.py,sha256=yAdGbLkzlOU_dLTx0lKDmAnj0ZgRXCEaIcPJWO69eaE,92
|
|
156
156
|
letta/server/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
157
|
-
letta/server/rest_api/app.py,sha256=
|
|
157
|
+
letta/server/rest_api/app.py,sha256=Iw6oVf3Lh8GEuKTMoEW57Wn21_iMbNps6Iz_DSd4qaU,6549
|
|
158
158
|
letta/server/rest_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
159
159
|
letta/server/rest_api/auth/index.py,sha256=fQBGyVylGSRfEMLQ17cZzrHd5Y1xiVylvPqH5Rl-lXQ,1378
|
|
160
160
|
letta/server/rest_api/auth_token.py,sha256=725EFEIiNj4dh70hrSd94UysmFD8vcJLrTRfNHkzxDo,774
|
|
@@ -168,23 +168,23 @@ letta/server/rest_api/routers/openai/assistants/threads.py,sha256=WXVGBaBvSNPB7Z
|
|
|
168
168
|
letta/server/rest_api/routers/openai/chat_completions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
169
169
|
letta/server/rest_api/routers/openai/chat_completions/chat_completions.py,sha256=-uye6cm4SnoQGwxhr1N1FrSXOlnO2Hvbfj6k8JSc45k,4918
|
|
170
170
|
letta/server/rest_api/routers/v1/__init__.py,sha256=sqlVZa-u9DJwdRsp0_8YUGrac9DHguIB4wETlEDRylA,666
|
|
171
|
-
letta/server/rest_api/routers/v1/agents.py,sha256=
|
|
171
|
+
letta/server/rest_api/routers/v1/agents.py,sha256=Dg_ZpQRVDP5vCOEiND7SWhnpGcraE5Qb4VZEdZhXprk,25509
|
|
172
172
|
letta/server/rest_api/routers/v1/blocks.py,sha256=0WekE_yBD2U3jYgPxI0DCFjACWavCAlvm_Ybw5SZBnw,2583
|
|
173
173
|
letta/server/rest_api/routers/v1/health.py,sha256=pKCuVESlVOhGIb4VC4K-H82eZqfghmT6kvj2iOkkKuc,401
|
|
174
174
|
letta/server/rest_api/routers/v1/jobs.py,sha256=a-j0v-5A0un0pVCOHpfeWnzpOWkVDQO6ti42k_qAlZY,2272
|
|
175
175
|
letta/server/rest_api/routers/v1/llms.py,sha256=TcyvSx6MEM3je5F4DysL7ligmssL_pFlJaaO4uL95VY,877
|
|
176
176
|
letta/server/rest_api/routers/v1/organizations.py,sha256=hCuni52aM1Gfmuu_BeodXAvTkfrvexEo_wZf8UtyaAM,2034
|
|
177
177
|
letta/server/rest_api/routers/v1/sources.py,sha256=eY_pk9jRL2Y9yIZdsTjH6EuKsfH1neaTU15MKNL0dvw,8749
|
|
178
|
-
letta/server/rest_api/routers/v1/tools.py,sha256=
|
|
178
|
+
letta/server/rest_api/routers/v1/tools.py,sha256=AYJP1dGqFLVZkWaypPi7TP7r53Vfz2Ejf_kWxmLl6IQ,4234
|
|
179
179
|
letta/server/rest_api/routers/v1/users.py,sha256=bxQ-YdevjDqmgNDfbSPAG_4KEVvPNBHD_-Lp1MdeMec,3374
|
|
180
180
|
letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
|
|
181
181
|
letta/server/rest_api/utils.py,sha256=GdHYCzXtbM5VCAYDPR0z5gnNZpRhwPld2BGZV7xT6cU,2924
|
|
182
|
-
letta/server/server.py,sha256=
|
|
183
|
-
letta/server/startup.sh,sha256=
|
|
182
|
+
letta/server/server.py,sha256=LxRrLkjosuxpAcL7mhKVY4dpZwH1QpNgWIo1tAJDkrs,78511
|
|
183
|
+
letta/server/startup.sh,sha256=Atyf4hL5XLpC4aA3esEyOeNWfemlgXlgpeKB59fDFvw,334
|
|
184
184
|
letta/server/static_files/assets/index-3ab03d5b.css,sha256=OrA9W4iKJ5h2Wlr7GwdAT4wow0CM8hVit1yOxEL49Qw,54295
|
|
185
|
-
letta/server/static_files/assets/index-
|
|
185
|
+
letta/server/static_files/assets/index-9fa459a2.js,sha256=j2oMcDJO9dWJaH5e-tsflbVpWK20gLWpZKJk4-Kuy6A,1815592
|
|
186
186
|
letta/server/static_files/favicon.ico,sha256=DezhLdFSbM8o81wCOZcV3riq7tFUOGQD4h6-vr-HuU0,342
|
|
187
|
-
letta/server/static_files/index.html,sha256=
|
|
187
|
+
letta/server/static_files/index.html,sha256=NmXJ7rPwblDBJj6oBKP6eeBwzBAeGhxtVnEZlLSuArk,1198
|
|
188
188
|
letta/server/static_files/memgpt_logo_transparent.png,sha256=7l6niNb4MlUILxLlUZPxIE1TEHj_Z9f9XDxoST3d7Vw,85383
|
|
189
189
|
letta/server/utils.py,sha256=rRvW6L1lzau4u9boamiyZH54lf5tQ91ypXzUW9cfSPA,1667
|
|
190
190
|
letta/server/ws_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -194,15 +194,15 @@ letta/server/ws_api/protocol.py,sha256=M_-gM5iuDBwa1cuN2IGNCG5GxMJwU2d3XW93XALv9
|
|
|
194
194
|
letta/server/ws_api/server.py,sha256=C2Kv48PCwl46DQFb0ZP30s86KJLQ6dZk2AhWQEZn9pY,6004
|
|
195
195
|
letta/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
196
196
|
letta/services/organization_manager.py,sha256=wW4wOmKaqhHC7oTGWU38OO-dFtmRI0JVmq_k8gI1b0A,3658
|
|
197
|
-
letta/services/tool_manager.py,sha256=
|
|
197
|
+
letta/services/tool_manager.py,sha256=5hZLcrMVgBHGbbWdAoNYtRplrCJYlQOEr5NFGatGd-Q,8439
|
|
198
198
|
letta/services/user_manager.py,sha256=5wjmnhLoxsc9FCKD0IPotfV24i_iCqmifOkhIBvshtc,4404
|
|
199
199
|
letta/settings.py,sha256=yiYNmnYKj_BdTm0cBEIvQKYGU-lCmFntqsyVfRUy3_k,3411
|
|
200
200
|
letta/streaming_interface.py,sha256=_FPUWy58j50evHcpXyd7zB1wWqeCc71NCFeWh_TBvnw,15736
|
|
201
201
|
letta/streaming_utils.py,sha256=329fsvj1ZN0r0LpQtmMPZ2vSxkDBIUUwvGHZFkjm2I8,11745
|
|
202
202
|
letta/system.py,sha256=buKYPqG5n2x41hVmWpu6JUpyd7vTWED9Km2_M7dLrvk,6960
|
|
203
203
|
letta/utils.py,sha256=SXLEYhyp3gHyIjrxNIKNZZ5ittKo3KOj6zxgC_Trex0,31012
|
|
204
|
-
letta_nightly-0.5.1.
|
|
205
|
-
letta_nightly-0.5.1.
|
|
206
|
-
letta_nightly-0.5.1.
|
|
207
|
-
letta_nightly-0.5.1.
|
|
208
|
-
letta_nightly-0.5.1.
|
|
204
|
+
letta_nightly-0.5.1.dev20241102104033.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
|
|
205
|
+
letta_nightly-0.5.1.dev20241102104033.dist-info/METADATA,sha256=KOm9oLUgDaDeIgl4W3wt_N2x9fWsgdJ_oD5hVbQ6jVw,10660
|
|
206
|
+
letta_nightly-0.5.1.dev20241102104033.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
207
|
+
letta_nightly-0.5.1.dev20241102104033.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
|
|
208
|
+
letta_nightly-0.5.1.dev20241102104033.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|