@@ -9,13 +9,13 @@ import * as StepsAPI from 'openai/resources/beta/threads/runs/steps';
9
9
import { CursorPage , type CursorPageParams } from 'openai/pagination' ;
10
10
11
11
export class Runs extends APIResource {
12
- steps : StepsAPI . Steps = new StepsAPI . Steps ( this . client ) ;
12
+ steps : StepsAPI . Steps = new StepsAPI . Steps ( this . _client ) ;
13
13
14
14
/**
15
15
* Create a run.
16
16
*/
17
17
create ( threadId : string , body : RunCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < Run > {
18
- return this . post ( `/threads/${ threadId } /runs` , {
18
+ return this . _client . post ( `/threads/${ threadId } /runs` , {
19
19
body,
20
20
...options ,
21
21
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
@@ -26,7 +26,7 @@ export class Runs extends APIResource {
26
26
* Retrieves a run.
27
27
*/
28
28
retrieve ( threadId : string , runId : string , options ?: Core . RequestOptions ) : Core . APIPromise < Run > {
29
- return this . get ( `/threads/${ threadId } /runs/${ runId } ` , {
29
+ return this . _client . get ( `/threads/${ threadId } /runs/${ runId } ` , {
30
30
...options ,
31
31
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
32
32
} ) ;
@@ -41,7 +41,7 @@ export class Runs extends APIResource {
41
41
body : RunUpdateParams ,
42
42
options ?: Core . RequestOptions ,
43
43
) : Core . APIPromise < Run > {
44
- return this . post ( `/threads/${ threadId } /runs/${ runId } ` , {
44
+ return this . _client . post ( `/threads/${ threadId } /runs/${ runId } ` , {
45
45
body,
46
46
...options ,
47
47
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
@@ -65,7 +65,7 @@ export class Runs extends APIResource {
65
65
if ( isRequestOptions ( query ) ) {
66
66
return this . list ( threadId , { } , query ) ;
67
67
}
68
- return this . getAPIList ( `/threads/${ threadId } /runs` , RunsPage , {
68
+ return this . _client . getAPIList ( `/threads/${ threadId } /runs` , RunsPage , {
69
69
query,
70
70
...options ,
71
71
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
@@ -76,7 +76,7 @@ export class Runs extends APIResource {
76
76
* Cancels a run that is `in_progress`.
77
77
*/
78
78
cancel ( threadId : string , runId : string , options ?: Core . RequestOptions ) : Core . APIPromise < Run > {
79
- return this . post ( `/threads/${ threadId } /runs/${ runId } /cancel` , {
79
+ return this . _client . post ( `/threads/${ threadId } /runs/${ runId } /cancel` , {
80
80
...options ,
81
81
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
82
82
} ) ;
@@ -94,7 +94,7 @@ export class Runs extends APIResource {
94
94
body : RunSubmitToolOutputsParams ,
95
95
options ?: Core . RequestOptions ,
96
96
) : Core . APIPromise < Run > {
97
- return this . post ( `/threads/${ threadId } /runs/${ runId } /submit_tool_outputs` , {
97
+ return this . _client . post ( `/threads/${ threadId } /runs/${ runId } /submit_tool_outputs` , {
98
98
body,
99
99
...options ,
100
100
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
0 commit comments