feat: add pagination to run messages endpoint (#5082)
* feat: add pagination to run messages endpoint * chore: regenerate API client with pagination parameters
This commit is contained in:
@@ -10207,6 +10207,19 @@
|
||||
"title": "Order"
|
||||
},
|
||||
"description": "Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first"
|
||||
},
|
||||
{
|
||||
"name": "order_by",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"const": "created_at",
|
||||
"type": "string",
|
||||
"description": "Field to sort by",
|
||||
"default": "created_at",
|
||||
"title": "Order By"
|
||||
},
|
||||
"description": "Field to sort by"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -187,6 +187,7 @@ async def list_run_messages(
|
||||
order: Literal["asc", "desc"] = Query(
|
||||
"asc", description="Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first"
|
||||
),
|
||||
order_by: Literal["created_at"] = Query("created_at", description="Field to sort by"),
|
||||
):
|
||||
"""Get response messages associated with a run."""
|
||||
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)
|
||||
|
||||
Reference in New Issue
Block a user