mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
fix: Fix limit for get_messages_by_ids (#2301)
This commit is contained in:
parent
b9b77fdc02
commit
2fc9b54f04
@ -32,7 +32,7 @@ class MessageManager:
|
|||||||
def get_messages_by_ids(self, message_ids: List[str], actor: PydanticUser) -> List[PydanticMessage]:
|
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."""
|
"""Fetch messages by ID and return them in the requested order."""
|
||||||
with self.session_maker() as session:
|
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):
|
if len(results) != len(message_ids):
|
||||||
raise NoResultFound(
|
raise NoResultFound(
|
||||||
|
Loading…
Reference in New Issue
Block a user