letta-nightly 0.11.5__py3-none-any.whl → 0.11.6.dev20250827104106__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.
- letta/__init__.py +1 -1
- letta/schemas/response_format.py +2 -2
- letta/server/generate_openapi_schema.sh +4 -4
- letta/services/helpers/agent_manager_helper.py +2 -2
- letta/services/llm_batch_manager.py +1 -1
- letta/services/tool_executor/tool_execution_sandbox.py +0 -1
- letta/services/tool_sandbox/local_sandbox.py +0 -2
- letta_nightly-0.11.6.dev20250827104106.dist-info/METADATA +665 -0
- {letta_nightly-0.11.5.dist-info → letta_nightly-0.11.6.dev20250827104106.dist-info}/RECORD +87 -87
- {letta_nightly-0.11.5.dist-info → letta_nightly-0.11.6.dev20250827104106.dist-info}/WHEEL +1 -1
- letta_nightly-0.11.6.dev20250827104106.dist-info/entry_points.txt +2 -0
- letta_nightly-0.11.5.dist-info/METADATA +0 -408
- letta_nightly-0.11.5.dist-info/entry_points.txt +0 -3
- {letta_nightly-0.11.5.dist-info → letta_nightly-0.11.6.dev20250827104106.dist-info/licenses}/LICENSE +0 -0
letta/__init__.py
CHANGED
letta/schemas/response_format.py
CHANGED
@@ -52,9 +52,9 @@ class JsonSchemaResponseFormat(ResponseFormat):
|
|
52
52
|
description="The JSON schema of the response.",
|
53
53
|
)
|
54
54
|
|
55
|
-
@field_validator("json_schema")
|
56
55
|
@classmethod
|
57
|
-
|
56
|
+
@field_validator("json_schema")
|
57
|
+
def validate_json_schema(cls, v: Dict[str, Any]) -> Dict[str, Any]:
|
58
58
|
"""Validate that the provided schema is a valid JSON schema."""
|
59
59
|
if "schema" not in v:
|
60
60
|
raise ValueError("JSON schema should include a schema property")
|
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
echo "Generating OpenAPI schema..."
|
3
3
|
|
4
|
-
# check if
|
5
|
-
if ! command -v
|
4
|
+
# check if uv is installed
|
5
|
+
if ! command -v uv &> /dev/null
|
6
6
|
then
|
7
|
-
echo "
|
7
|
+
echo "uv could not be found. Please install uv to generate the OpenAPI schema."
|
8
8
|
exit
|
9
9
|
fi
|
10
10
|
|
11
11
|
# generate OpenAPI schema
|
12
|
-
|
12
|
+
uv run python -c 'from letta.server.rest_api.app import app, generate_openapi_schema; generate_openapi_schema(app);'
|
@@ -249,7 +249,7 @@ def compile_system_message(
|
|
249
249
|
append_icm_if_missing: bool = True,
|
250
250
|
template_format: Literal["f-string", "mustache", "jinja2"] = "f-string",
|
251
251
|
previous_message_count: int = 0,
|
252
|
-
archival_memory_size: int = 0,
|
252
|
+
archival_memory_size: int | None = 0,
|
253
253
|
tool_rules_solver: Optional[ToolRulesSolver] = None,
|
254
254
|
sources: Optional[List] = None,
|
255
255
|
max_files_open: Optional[int] = None,
|
@@ -281,7 +281,7 @@ def compile_system_message(
|
|
281
281
|
memory_metadata_string = PromptGenerator.compile_memory_metadata_block(
|
282
282
|
memory_edit_timestamp=in_context_memory_last_edit,
|
283
283
|
previous_message_count=previous_message_count,
|
284
|
-
archival_memory_size=archival_memory_size,
|
284
|
+
archival_memory_size=archival_memory_size or 0,
|
285
285
|
timezone=timezone,
|
286
286
|
)
|
287
287
|
|
@@ -218,7 +218,7 @@ class LLMBatchManager:
|
|
218
218
|
query = query.where(LLMBatchJob.organization_id == actor.organization_id)
|
219
219
|
|
220
220
|
if weeks is not None:
|
221
|
-
cutoff_datetime = datetime.datetime.
|
221
|
+
cutoff_datetime = datetime.datetime.now(datetime.UTC) - datetime.timedelta(weeks=weeks)
|
222
222
|
query = query.where(LLMBatchJob.created_at >= cutoff_datetime)
|
223
223
|
|
224
224
|
if batch_size is not None:
|
@@ -155,7 +155,6 @@ class AsyncToolSandboxLocal(AsyncToolSandboxBase):
|
|
155
155
|
if not settings.debug:
|
156
156
|
await asyncio.to_thread(os.remove, temp_file_path)
|
157
157
|
|
158
|
-
@trace_method
|
159
158
|
async def _prepare_venv(self, local_configs, venv_path: str, env: Dict[str, str]):
|
160
159
|
"""
|
161
160
|
Prepare virtual environment asynchronously (in a background thread).
|
@@ -179,7 +178,6 @@ class AsyncToolSandboxLocal(AsyncToolSandboxBase):
|
|
179
178
|
)
|
180
179
|
log_event(name="finish install_pip_requirements_for_sandbox", attributes={"local_configs": local_configs.model_dump_json()})
|
181
180
|
|
182
|
-
@trace_method
|
183
181
|
async def _execute_tool_subprocess(
|
184
182
|
self, sbx_config, python_executable: str, temp_file_path: str, env: Dict[str, str], cwd: str
|
185
183
|
) -> ToolExecutionResult:
|