Skip to content

Commit 767bec0

Browse files
committed
feat(api): add support for filtering messages by run_id (openai#747)
1 parent 60bc77f commit 767bec0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/resources/beta/threads/messages/messages.ts

+5
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,11 @@ export interface MessageListParams extends CursorPageParams {
551551
* order and `desc` for descending order.
552552
*/
553553
order?: 'asc' | 'desc';
554+
555+
/**
556+
* Filter messages by the run ID that generated them.
557+
*/
558+
run_id?: string;
554559
}
555560

556561
export namespace Messages {

tests/api-resources/beta/threads/messages/messages.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('resource messages', () => {
8181
await expect(
8282
openai.beta.threads.messages.list(
8383
'string',
84-
{ after: 'string', before: 'string', limit: 0, order: 'asc' },
84+
{ after: 'string', before: 'string', limit: 0, order: 'asc', run_id: 'string' },
8585
{ path: '/_stainless_unknown_path' },
8686
),
8787
).rejects.toThrow(OpenAI.NotFoundError);

0 commit comments

Comments
 (0)