Skip to content

Commit

Permalink
Fix limit
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzh72 committed Dec 21, 2024
1 parent b9b77fd commit 8fb2e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion letta/services/message_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_message_by_id(self, message_id: str, actor: PydanticUser) -> Optional[Py
def get_messages_by_ids(self, message_ids: List[str], actor: PydanticUser) -> List[PydanticMessage]:
"""Fetch messages by ID and return them in the requested order."""
with self.session_maker() as session:
results = MessageModel.list(db_session=session, id=message_ids, organization_id=actor.organization_id)
results = MessageModel.list(db_session=session, id=message_ids, organization_id=actor.organization_id, limit=len(message_ids))

if len(results) != len(message_ids):
raise NoResultFound(
Expand Down

0 comments on commit 8fb2e78

Please sign in to comment.