@@ -9,13 +9,13 @@ import * as FilesAPI from 'openai/resources/beta/assistants/files';
9
9
import { CursorPage , type CursorPageParams } from 'openai/pagination' ;
10
10
11
11
export class Assistants extends APIResource {
12
- files : FilesAPI . Files = new FilesAPI . Files ( this . client ) ;
12
+ files : FilesAPI . Files = new FilesAPI . Files ( this . _client ) ;
13
13
14
14
/**
15
15
* Create an assistant with a model and instructions.
16
16
*/
17
17
create ( body : AssistantCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < Assistant > {
18
- return this . post ( '/assistants' , {
18
+ return this . _client . post ( '/assistants' , {
19
19
body,
20
20
...options ,
21
21
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
@@ -26,7 +26,7 @@ export class Assistants extends APIResource {
26
26
* Retrieves an assistant.
27
27
*/
28
28
retrieve ( assistantId : string , options ?: Core . RequestOptions ) : Core . APIPromise < Assistant > {
29
- return this . get ( `/assistants/${ assistantId } ` , {
29
+ return this . _client . get ( `/assistants/${ assistantId } ` , {
30
30
...options ,
31
31
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
32
32
} ) ;
@@ -40,7 +40,7 @@ export class Assistants extends APIResource {
40
40
body : AssistantUpdateParams ,
41
41
options ?: Core . RequestOptions ,
42
42
) : Core . APIPromise < Assistant > {
43
- return this . post ( `/assistants/${ assistantId } ` , {
43
+ return this . _client . post ( `/assistants/${ assistantId } ` , {
44
44
body,
45
45
...options ,
46
46
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
@@ -62,7 +62,7 @@ export class Assistants extends APIResource {
62
62
if ( isRequestOptions ( query ) ) {
63
63
return this . list ( { } , query ) ;
64
64
}
65
- return this . getAPIList ( '/assistants' , AssistantsPage , {
65
+ return this . _client . getAPIList ( '/assistants' , AssistantsPage , {
66
66
query,
67
67
...options ,
68
68
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
@@ -73,7 +73,7 @@ export class Assistants extends APIResource {
73
73
* Delete an assistant.
74
74
*/
75
75
del ( assistantId : string , options ?: Core . RequestOptions ) : Core . APIPromise < AssistantDeleted > {
76
- return this . delete ( `/assistants/${ assistantId } ` , {
76
+ return this . _client . delete ( `/assistants/${ assistantId } ` , {
77
77
...options ,
78
78
headers : { 'OpenAI-Beta' : 'assistants=v1' , ...options ?. headers } ,
79
79
} ) ;
0 commit comments