Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: patch agent messages pagination / cursor #1787

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions letta/agent_store/chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ def query_text(self, query, count=None, start=None, filters: Optional[Dict] = {}
def get_all_cursor(
self,
filters: Optional[Dict] = {},
after: str = None,
before: str = None,
after: Optional[str] = None,
before: Optional[str] = None,
limit: Optional[int] = 1000,
order_by: str = "created_at",
reverse: bool = False,
Expand Down
6 changes: 3 additions & 3 deletions letta/agent_store/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ def get_all_paginated(self, filters: Optional[Dict] = {}, page_size: Optional[in
def get_all_cursor(
self,
filters: Optional[Dict] = {},
after: str = None,
before: str = None,
limit: Optional[int] = 1000,
after: Optional[str] = None,
before: Optional[str] = None,
limit: int = 1000,
order_by: str = "created_at",
reverse: bool = False,
):
Expand Down
8 changes: 4 additions & 4 deletions letta/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,10 @@ def get_agent_recall_cursor(
agent_id: str,
after: Optional[str] = None,
before: Optional[str] = None,
limit: Optional[int] = 100,
order_by: Optional[str] = "created_at",
order: Optional[str] = "asc",
reverse: Optional[bool] = False,
limit: int = 100,
order_by: str = "created_at",
order: str = "asc",
reverse: bool = False,
return_message_object: bool = True,
) -> Union[List[Message], List[LettaMessage]]:
if self.ms.get_user(user_id=user_id) is None:
Expand Down
Loading