Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: nonetype not iterable (#7216)

cthomase6a4b3e8741c
diff --git a/letta/agents/helpers.py b/letta/agents/helpers.py
index 9270ba5fb..2490feb7f 100644
--- a/letta/agents/helpers.py
+++ b/letta/agents/helpers.py
@@ -109,6 +109,8 @@ def validate_approval_tool_call_ids(approval_request_message: Message, approval_
)
approval_responses = approval_response_message.approvals
+ if not approval_responses:
+ raise ValueError("Invalid approval response. Approval response message does not contain any approvals.")
approval_response_tool_call_ids = [approval_response.tool_call_id for approval_response in approval_responses]
request_response_diff = set(approval_request_tool_call_ids).symmetric_difference(set(approval_response_tool_call_ids))