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 CHANGED
@@ -5,7 +5,7 @@ try:
5
5
  __version__ = version("letta")
6
6
  except PackageNotFoundError:
7
7
  # Fallback for development installations
8
- __version__ = "0.11.5"
8
+ __version__ = "0.11.6"
9
9
 
10
10
  if os.environ.get("LETTA_VERSION"):
11
11
  __version__ = os.environ["LETTA_VERSION"]
@@ -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
- def validate_json_schema(cls, v: dict[str, Any]) -> Dict[str, Any]:
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 poetry is installed
5
- if ! command -v poetry &> /dev/null
4
+ # check if uv is installed
5
+ if ! command -v uv &> /dev/null
6
6
  then
7
- echo "Poetry could not be found. Please install poetry to generate the OpenAPI schema."
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
- poetry run python -c 'from letta.server.rest_api.app import app, generate_openapi_schema; generate_openapi_schema(app);'
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.utcnow() - datetime.timedelta(weeks=weeks)
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:
@@ -249,7 +249,6 @@ class ToolExecutionSandbox:
249
249
  logger.error(f"Executing tool {self.tool_name} has an unexpected error: {e}")
250
250
  raise e
251
251
 
252
- @trace_method
253
252
  def run_local_dir_sandbox_directly(
254
253
  self,
255
254
  sbx_config: SandboxConfig,
@@ -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: