fix: bugfixes (and bump) (#3071)

This commit is contained in:
Andy Li
2025-06-27 14:23:42 -07:00
committed by GitHub
parent 9cf2f2d86b
commit 98a79afbdd
5 changed files with 10 additions and 30 deletions

View File

@@ -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"]

View File

@@ -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:

View File

@@ -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

View File

@@ -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)

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "letta"
version = "0.8.6"
version = "0.8.7"
packages = [
{include = "letta"},
]