feat: add conversation_id filter to list runs [LET-6865] (#8404)
feat: add conversation_id filter to list runs
This commit is contained in:
@@ -14469,6 +14469,24 @@
|
|||||||
},
|
},
|
||||||
"description": "Filter runs by stop reason."
|
"description": "Filter runs by stop reason."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "conversation_id",
|
||||||
|
"in": "query",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Filter runs by conversation ID.",
|
||||||
|
"title": "Conversation Id"
|
||||||
|
},
|
||||||
|
"description": "Filter runs by conversation ID."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "before",
|
"name": "before",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ async def list_runs(
|
|||||||
statuses: Optional[List[str]] = Query(None, description="Filter runs by status. Can specify multiple statuses."),
|
statuses: Optional[List[str]] = Query(None, description="Filter runs by status. Can specify multiple statuses."),
|
||||||
background: Optional[bool] = Query(None, description="If True, filters for runs that were created in background mode."),
|
background: Optional[bool] = Query(None, description="If True, filters for runs that were created in background mode."),
|
||||||
stop_reason: Optional[StopReasonType] = Query(None, description="Filter runs by stop reason."),
|
stop_reason: Optional[StopReasonType] = Query(None, description="Filter runs by stop reason."),
|
||||||
|
conversation_id: Optional[str] = Query(None, description="Filter runs by conversation ID."),
|
||||||
before: Optional[str] = Query(
|
before: Optional[str] = Query(
|
||||||
None, description="Run ID cursor for pagination. Returns runs that come before this run ID in the specified sort order"
|
None, description="Run ID cursor for pagination. Returns runs that come before this run ID in the specified sort order"
|
||||||
),
|
),
|
||||||
@@ -109,6 +110,7 @@ async def list_runs(
|
|||||||
ascending=sort_ascending,
|
ascending=sort_ascending,
|
||||||
stop_reason=stop_reason,
|
stop_reason=stop_reason,
|
||||||
background=background,
|
background=background,
|
||||||
|
conversation_id=conversation_id,
|
||||||
)
|
)
|
||||||
return runs
|
return runs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user