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:
@@ -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."
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user