chore: add add limit of 100 (#6143)

* add limit of 100

* revert scheduler logging

* api changes

* remove redundant None type check
This commit is contained in:
Kian Jones
2025-11-13 11:46:08 -08:00
committed by Caren Thomas
parent 9e9ae9d4ae
commit 98ab655765
3 changed files with 8 additions and 10 deletions

View File

@@ -6783,6 +6783,7 @@
}
],
"description": "How many results to include in the response.",
"default": 100,
"title": "Limit"
},
"description": "How many results to include in the response."

View File

@@ -1145,7 +1145,7 @@ async def list_passages(
server: "SyncServer" = Depends(get_letta_server),
after: str | None = Query(None, description="Unique ID of the memory to start the query range at."),
before: str | None = Query(None, description="Unique ID of the memory to end the query range at."),
limit: int | None = Query(None, description="How many results to include in the response."),
limit: int | None = Query(100, description="How many results to include in the response."),
search: str | None = Query(None, description="Search passages by text"),
ascending: bool | None = Query(
True, description="Whether to sort passages oldest to newest (True, default) or newest to oldest (False)"

View File

@@ -2001,9 +2001,8 @@ class AgentManager:
agent_only=agent_only,
)
# Add limit
if limit:
main_query = main_query.limit(limit)
# Add limit (enforce default if not provided)
main_query = main_query.limit(limit)
# Execute query
result = await session.execute(main_query)
@@ -2077,9 +2076,8 @@ class AgentManager:
agent_only=agent_only,
)
# Add limit
if limit:
main_query = main_query.limit(limit)
# Add limit (enforce default if not provided)
main_query = main_query.limit(limit)
# Execute query
result = await session.execute(main_query)
@@ -2139,9 +2137,8 @@ class AgentManager:
embedding_config=embedding_config,
)
# Add limit
if limit:
main_query = main_query.limit(limit)
# Add limit (enforce default if not provided)
main_query = main_query.limit(limit)
# Execute query
result = await session.execute(main_query)