From 98a79afbdd12c5f3878ff01cd2e867d909094366 Mon Sep 17 00:00:00 2001 From: Andy Li <55300002+cliandy@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:23:42 -0700 Subject: [PATCH] fix: bugfixes (and bump) (#3071) --- letta/__init__.py | 2 +- letta/groups/sleeptime_multi_agent_v2.py | 6 ++++- letta/services/step_manager.py | 28 ++---------------------- letta/utils.py | 2 +- pyproject.toml | 2 +- 5 files changed, 10 insertions(+), 30 deletions(-) diff --git a/letta/__init__.py b/letta/__init__.py index ab4deddf..d01f5f35 100644 --- a/letta/__init__.py +++ b/letta/__init__.py @@ -1,6 +1,6 @@ import os -__version__ = "0.8.6" +__version__ = "0.8.7" if os.environ.get("LETTA_VERSION"): __version__ = os.environ["LETTA_VERSION"] diff --git a/letta/groups/sleeptime_multi_agent_v2.py b/letta/groups/sleeptime_multi_agent_v2.py index 78d587d9..a314ac2d 100644 --- a/letta/groups/sleeptime_multi_agent_v2.py +++ b/letta/groups/sleeptime_multi_agent_v2.py @@ -141,7 +141,11 @@ class SleeptimeMultiAgentV2(BaseAgent): include_return_message_types: Optional[List[MessageType]] = None, ): response = await self.step( - input_messages, max_steps, use_assistant_message, request_start_timestamp_ns, include_return_message_types + input_messages=input_messages, + max_steps=max_steps, + use_assistant_message=use_assistant_message, + request_start_timestamp_ns=request_start_timestamp_ns, + include_return_message_types=include_return_message_types, ) for message in response.messages: diff --git a/letta/services/step_manager.py b/letta/services/step_manager.py index 3f5ca389..a5fed8bf 100644 --- a/letta/services/step_manager.py +++ b/letta/services/step_manager.py @@ -254,6 +254,7 @@ class StepManager: return job +# noinspection PyTypeChecker @singleton class NoopStepManager(StepManager): """ @@ -296,29 +297,4 @@ class NoopStepManager(StepManager): job_id: Optional[str] = None, step_id: Optional[str] = None, ) -> PydanticStep: - step_data = { - "origin": None, - "organization_id": actor.organization_id, - "agent_id": agent_id, - "provider_id": provider_id, - "provider_name": provider_name, - "provider_category": provider_category, - "model": model, - "model_endpoint": model_endpoint, - "context_window_limit": context_window_limit, - "completion_tokens": usage.completion_tokens, - "prompt_tokens": usage.prompt_tokens, - "total_tokens": usage.total_tokens, - "job_id": job_id, - "tags": [], - "tid": None, - "trace_id": get_trace_id(), # Get the current trace ID - } - if step_id: - step_data["id"] = step_id - async with db_registry.async_session() as session: - if job_id: - await self._verify_job_access_async(session, job_id, actor, access=["write"]) - new_step = StepModel(**step_data) - await new_step.create_async(session) - return new_step.to_pydantic() + return diff --git a/letta/utils.py b/letta/utils.py index 5c834d7e..ef2306d6 100644 --- a/letta/utils.py +++ b/letta/utils.py @@ -546,7 +546,7 @@ def enforce_types(func): for arg_name, arg_value in kwargs.items(): hint = hints.get(arg_name) if hint and not matches_type(arg_value, hint): - raise ValueError(f"Argument {arg_name} does not match type {hint}; is {arg_value}") + raise ValueError(f"Argument {arg_name} does not match type {hint}; is {arg_value} of type {type(arg_value)}") return func(*args, **kwargs) diff --git a/pyproject.toml b/pyproject.toml index eecbe969..3ece263e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "letta" -version = "0.8.6" +version = "0.8.7" packages = [ {include = "letta"}, ]