openai 4.16.0 → 4.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/resources/beta/assistants/assistants.d.ts +35 -35
- package/resources/beta/assistants/assistants.js +4 -4
- package/resources/beta/assistants/assistants.mjs +4 -4
- package/resources/beta/assistants/files.d.ts +9 -9
- package/resources/beta/assistants/files.js +3 -3
- package/resources/beta/assistants/files.mjs +3 -3
- package/resources/beta/threads/messages/files.d.ts +5 -5
- package/resources/beta/threads/messages/files.js +1 -1
- package/resources/beta/threads/messages/files.mjs +1 -1
- package/resources/beta/threads/messages/messages.d.ts +36 -36
- package/resources/beta/threads/messages/messages.js +3 -3
- package/resources/beta/threads/messages/messages.mjs +3 -3
- package/resources/beta/threads/runs/runs.d.ts +45 -45
- package/resources/beta/threads/runs/runs.js +5 -5
- package/resources/beta/threads/runs/runs.mjs +5 -5
- package/resources/beta/threads/runs/steps.d.ts +32 -32
- package/resources/beta/threads/runs/steps.js +1 -1
- package/resources/beta/threads/runs/steps.mjs +1 -1
- package/resources/beta/threads/threads.d.ts +31 -31
- package/resources/beta/threads/threads.js +5 -5
- package/resources/beta/threads/threads.mjs +5 -5
- package/resources/files.d.ts +5 -5
- package/src/resources/beta/assistants/assistants.ts +35 -35
- package/src/resources/beta/assistants/files.ts +9 -9
- package/src/resources/beta/threads/messages/files.ts +5 -5
- package/src/resources/beta/threads/messages/messages.ts +36 -36
- package/src/resources/beta/threads/runs/runs.ts +45 -45
- package/src/resources/beta/threads/runs/steps.ts +32 -32
- package/src/resources/beta/threads/threads.ts +31 -31
- package/src/resources/files.ts +5 -5
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.16.1 (2023-11-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.16.0...v4.16.1](https://github.com/openai/openai-node/compare/v4.16.0...v4.16.1)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **api:** retreival -> retrieval ([#437](https://github.com/openai/openai-node/issues/437)) ([b4bd3ee](https://github.com/openai/openai-node/commit/b4bd3eefdd3903abcc57c431382cc2124d39307b))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
* **api:** improve docstrings ([#435](https://github.com/openai/openai-node/issues/435)) ([ee8b24c](https://github.com/openai/openai-node/commit/ee8b24c70a5ccb944e02ff2201668d6bc2b597b3))
|
|
15
|
+
|
|
3
16
|
## 4.16.0 (2023-11-06)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v4.15.4...v4.16.0](https://github.com/openai/openai-node/compare/v4.15.4...v4.16.0)
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -6,31 +6,31 @@ import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
|
6
6
|
export declare class Assistants extends APIResource {
|
|
7
7
|
files: FilesAPI.Files;
|
|
8
8
|
/**
|
|
9
|
-
* Create an
|
|
9
|
+
* Create an assistant with a model and instructions.
|
|
10
10
|
*/
|
|
11
11
|
create(body: AssistantCreateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant>;
|
|
12
12
|
/**
|
|
13
|
-
* Retrieves an
|
|
13
|
+
* Retrieves an assistant.
|
|
14
14
|
*/
|
|
15
15
|
retrieve(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<Assistant>;
|
|
16
16
|
/**
|
|
17
|
-
* Modifies an
|
|
17
|
+
* Modifies an assistant.
|
|
18
18
|
*/
|
|
19
19
|
update(assistantId: string, body: AssistantUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant>;
|
|
20
20
|
/**
|
|
21
|
-
* Returns a list of
|
|
21
|
+
* Returns a list of assistants.
|
|
22
22
|
*/
|
|
23
23
|
list(query?: AssistantListParams, options?: Core.RequestOptions): Core.PagePromise<AssistantsPage, Assistant>;
|
|
24
24
|
list(options?: Core.RequestOptions): Core.PagePromise<AssistantsPage, Assistant>;
|
|
25
25
|
/**
|
|
26
|
-
* Delete an
|
|
26
|
+
* Delete an assistant.
|
|
27
27
|
*/
|
|
28
28
|
del(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<AsssitantDeleted>;
|
|
29
29
|
}
|
|
30
30
|
export declare class AssistantsPage extends CursorPage<Assistant> {
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Represents an `
|
|
33
|
+
* Represents an `assistant` that can call the model and use tools.
|
|
34
34
|
*/
|
|
35
35
|
export interface Assistant {
|
|
36
36
|
/**
|
|
@@ -38,21 +38,21 @@ export interface Assistant {
|
|
|
38
38
|
*/
|
|
39
39
|
id: string;
|
|
40
40
|
/**
|
|
41
|
-
* The Unix timestamp (in seconds) for when the
|
|
41
|
+
* The Unix timestamp (in seconds) for when the assistant was created.
|
|
42
42
|
*/
|
|
43
43
|
created_at: number;
|
|
44
44
|
/**
|
|
45
|
-
* The description of the
|
|
45
|
+
* The description of the assistant. The maximum length is 512 characters.
|
|
46
46
|
*/
|
|
47
47
|
description: string | null;
|
|
48
48
|
/**
|
|
49
|
-
* A list of [
|
|
50
|
-
* attached to this
|
|
51
|
-
*
|
|
49
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
|
|
50
|
+
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
51
|
+
* assistant. Files are ordered by their creation date in ascending order.
|
|
52
52
|
*/
|
|
53
53
|
file_ids: Array<string>;
|
|
54
54
|
/**
|
|
55
|
-
* The system instructions that the
|
|
55
|
+
* The system instructions that the assistant uses. The maximum length is 32768
|
|
56
56
|
* characters.
|
|
57
57
|
*/
|
|
58
58
|
instructions: string | null;
|
|
@@ -72,7 +72,7 @@ export interface Assistant {
|
|
|
72
72
|
*/
|
|
73
73
|
model: string;
|
|
74
74
|
/**
|
|
75
|
-
* The name of the
|
|
75
|
+
* The name of the assistant. The maximum length is 256 characters.
|
|
76
76
|
*/
|
|
77
77
|
name: string | null;
|
|
78
78
|
/**
|
|
@@ -80,10 +80,10 @@ export interface Assistant {
|
|
|
80
80
|
*/
|
|
81
81
|
object: 'assistant';
|
|
82
82
|
/**
|
|
83
|
-
* A list of tool enabled on the
|
|
83
|
+
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
84
84
|
* assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.
|
|
85
85
|
*/
|
|
86
|
-
tools: Array<Assistant.CodeInterpreter | Assistant.
|
|
86
|
+
tools: Array<Assistant.CodeInterpreter | Assistant.Retrieval | Assistant.Function>;
|
|
87
87
|
}
|
|
88
88
|
export declare namespace Assistant {
|
|
89
89
|
interface CodeInterpreter {
|
|
@@ -92,11 +92,11 @@ export declare namespace Assistant {
|
|
|
92
92
|
*/
|
|
93
93
|
type: 'code_interpreter';
|
|
94
94
|
}
|
|
95
|
-
interface
|
|
95
|
+
interface Retrieval {
|
|
96
96
|
/**
|
|
97
|
-
* The type of tool being defined: `
|
|
97
|
+
* The type of tool being defined: `retrieval`
|
|
98
98
|
*/
|
|
99
|
-
type: '
|
|
99
|
+
type: 'retrieval';
|
|
100
100
|
}
|
|
101
101
|
interface Function {
|
|
102
102
|
/**
|
|
@@ -152,17 +152,17 @@ export interface AssistantCreateParams {
|
|
|
152
152
|
*/
|
|
153
153
|
model: string;
|
|
154
154
|
/**
|
|
155
|
-
* The description of the
|
|
155
|
+
* The description of the assistant. The maximum length is 512 characters.
|
|
156
156
|
*/
|
|
157
157
|
description?: string | null;
|
|
158
158
|
/**
|
|
159
|
-
* A list of [
|
|
160
|
-
* attached to this
|
|
161
|
-
*
|
|
159
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
|
|
160
|
+
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
161
|
+
* assistant. Files are ordered by their creation date in ascending order.
|
|
162
162
|
*/
|
|
163
163
|
file_ids?: Array<string>;
|
|
164
164
|
/**
|
|
165
|
-
* The system instructions that the
|
|
165
|
+
* The system instructions that the assistant uses. The maximum length is 32768
|
|
166
166
|
* characters.
|
|
167
167
|
*/
|
|
168
168
|
instructions?: string | null;
|
|
@@ -174,11 +174,11 @@ export interface AssistantCreateParams {
|
|
|
174
174
|
*/
|
|
175
175
|
metadata?: unknown | null;
|
|
176
176
|
/**
|
|
177
|
-
* The name of the
|
|
177
|
+
* The name of the assistant. The maximum length is 256 characters.
|
|
178
178
|
*/
|
|
179
179
|
name?: string | null;
|
|
180
180
|
/**
|
|
181
|
-
* A list of tool enabled on the
|
|
181
|
+
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
182
182
|
* assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.
|
|
183
183
|
*/
|
|
184
184
|
tools?: Array<AssistantCreateParams.AssistantToolsCode | AssistantCreateParams.AssistantToolsRetrieval | AssistantCreateParams.AssistantToolsFunction>;
|
|
@@ -192,9 +192,9 @@ export declare namespace AssistantCreateParams {
|
|
|
192
192
|
}
|
|
193
193
|
interface AssistantToolsRetrieval {
|
|
194
194
|
/**
|
|
195
|
-
* The type of tool being defined: `
|
|
195
|
+
* The type of tool being defined: `retrieval`
|
|
196
196
|
*/
|
|
197
|
-
type: '
|
|
197
|
+
type: 'retrieval';
|
|
198
198
|
}
|
|
199
199
|
interface AssistantToolsFunction {
|
|
200
200
|
/**
|
|
@@ -237,19 +237,19 @@ export declare namespace AssistantCreateParams {
|
|
|
237
237
|
}
|
|
238
238
|
export interface AssistantUpdateParams {
|
|
239
239
|
/**
|
|
240
|
-
* The description of the
|
|
240
|
+
* The description of the assistant. The maximum length is 512 characters.
|
|
241
241
|
*/
|
|
242
242
|
description?: string | null;
|
|
243
243
|
/**
|
|
244
244
|
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs
|
|
245
|
-
* attached to this
|
|
246
|
-
*
|
|
245
|
+
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
246
|
+
* assistant. Files are ordered by their creation date in ascending order. If a
|
|
247
247
|
* file was previosuly attached to the list but does not show up in the list, it
|
|
248
248
|
* will be deleted from the assistant.
|
|
249
249
|
*/
|
|
250
250
|
file_ids?: Array<string>;
|
|
251
251
|
/**
|
|
252
|
-
* The system instructions that the
|
|
252
|
+
* The system instructions that the assistant uses. The maximum length is 32768
|
|
253
253
|
* characters.
|
|
254
254
|
*/
|
|
255
255
|
instructions?: string | null;
|
|
@@ -269,11 +269,11 @@ export interface AssistantUpdateParams {
|
|
|
269
269
|
*/
|
|
270
270
|
model?: string;
|
|
271
271
|
/**
|
|
272
|
-
* The name of the
|
|
272
|
+
* The name of the assistant. The maximum length is 256 characters.
|
|
273
273
|
*/
|
|
274
274
|
name?: string | null;
|
|
275
275
|
/**
|
|
276
|
-
* A list of tool enabled on the
|
|
276
|
+
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
277
277
|
* assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.
|
|
278
278
|
*/
|
|
279
279
|
tools?: Array<AssistantUpdateParams.AssistantToolsCode | AssistantUpdateParams.AssistantToolsRetrieval | AssistantUpdateParams.AssistantToolsFunction>;
|
|
@@ -287,9 +287,9 @@ export declare namespace AssistantUpdateParams {
|
|
|
287
287
|
}
|
|
288
288
|
interface AssistantToolsRetrieval {
|
|
289
289
|
/**
|
|
290
|
-
* The type of tool being defined: `
|
|
290
|
+
* The type of tool being defined: `retrieval`
|
|
291
291
|
*/
|
|
292
|
-
type: '
|
|
292
|
+
type: 'retrieval';
|
|
293
293
|
}
|
|
294
294
|
interface AssistantToolsFunction {
|
|
295
295
|
/**
|
|
@@ -36,7 +36,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
36
36
|
this.files = new FilesAPI.Files(this.client);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Create an
|
|
39
|
+
* Create an assistant with a model and instructions.
|
|
40
40
|
*/
|
|
41
41
|
create(body, options) {
|
|
42
42
|
return this.post('/assistants', {
|
|
@@ -46,7 +46,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Retrieves an
|
|
49
|
+
* Retrieves an assistant.
|
|
50
50
|
*/
|
|
51
51
|
retrieve(assistantId, options) {
|
|
52
52
|
return this.get(`/assistants/${assistantId}`, {
|
|
@@ -55,7 +55,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Modifies an
|
|
58
|
+
* Modifies an assistant.
|
|
59
59
|
*/
|
|
60
60
|
update(assistantId, body, options) {
|
|
61
61
|
return this.post(`/assistants/${assistantId}`, {
|
|
@@ -75,7 +75,7 @@ class Assistants extends resource_1.APIResource {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Delete an
|
|
78
|
+
* Delete an assistant.
|
|
79
79
|
*/
|
|
80
80
|
del(assistantId, options) {
|
|
81
81
|
return this.delete(`/assistants/${assistantId}`, {
|
|
@@ -10,7 +10,7 @@ export class Assistants extends APIResource {
|
|
|
10
10
|
this.files = new FilesAPI.Files(this.client);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Create an
|
|
13
|
+
* Create an assistant with a model and instructions.
|
|
14
14
|
*/
|
|
15
15
|
create(body, options) {
|
|
16
16
|
return this.post('/assistants', {
|
|
@@ -20,7 +20,7 @@ export class Assistants extends APIResource {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Retrieves an
|
|
23
|
+
* Retrieves an assistant.
|
|
24
24
|
*/
|
|
25
25
|
retrieve(assistantId, options) {
|
|
26
26
|
return this.get(`/assistants/${assistantId}`, {
|
|
@@ -29,7 +29,7 @@ export class Assistants extends APIResource {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Modifies an
|
|
32
|
+
* Modifies an assistant.
|
|
33
33
|
*/
|
|
34
34
|
update(assistantId, body, options) {
|
|
35
35
|
return this.post(`/assistants/${assistantId}`, {
|
|
@@ -49,7 +49,7 @@ export class Assistants extends APIResource {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Delete an
|
|
52
|
+
* Delete an assistant.
|
|
53
53
|
*/
|
|
54
54
|
del(assistantId, options) {
|
|
55
55
|
return this.delete(`/assistants/${assistantId}`, {
|
|
@@ -4,9 +4,9 @@ import * as FilesAPI from 'openai/resources/beta/assistants/files';
|
|
|
4
4
|
import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
5
5
|
export declare class Files extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create an
|
|
7
|
+
* Create an assistant file by attaching a
|
|
8
8
|
* [File](https://platform.openai.com/docs/api-reference/files) to an
|
|
9
|
-
* [
|
|
9
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants).
|
|
10
10
|
*/
|
|
11
11
|
create(assistantId: string, body: FileCreateParams, options?: Core.RequestOptions): Core.APIPromise<AssistantFile>;
|
|
12
12
|
/**
|
|
@@ -14,12 +14,12 @@ export declare class Files extends APIResource {
|
|
|
14
14
|
*/
|
|
15
15
|
retrieve(assistantId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<AssistantFile>;
|
|
16
16
|
/**
|
|
17
|
-
* Returns a list of
|
|
17
|
+
* Returns a list of assistant files.
|
|
18
18
|
*/
|
|
19
19
|
list(assistantId: string, query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<AssistantFilesPage, AssistantFile>;
|
|
20
20
|
list(assistantId: string, options?: Core.RequestOptions): Core.PagePromise<AssistantFilesPage, AssistantFile>;
|
|
21
21
|
/**
|
|
22
|
-
* Delete an
|
|
22
|
+
* Delete an assistant file.
|
|
23
23
|
*/
|
|
24
24
|
del(assistantId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<FileDeleteResponse>;
|
|
25
25
|
}
|
|
@@ -27,7 +27,7 @@ export declare class AssistantFilesPage extends CursorPage<AssistantFile> {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* A list of [Files](https://platform.openai.com/docs/api-reference/files) attached
|
|
30
|
-
* to an `
|
|
30
|
+
* to an `assistant`.
|
|
31
31
|
*/
|
|
32
32
|
export interface AssistantFile {
|
|
33
33
|
/**
|
|
@@ -35,11 +35,11 @@ export interface AssistantFile {
|
|
|
35
35
|
*/
|
|
36
36
|
id: string;
|
|
37
37
|
/**
|
|
38
|
-
* The
|
|
38
|
+
* The assistant ID that the file is attached to.
|
|
39
39
|
*/
|
|
40
40
|
assistant_id: string;
|
|
41
41
|
/**
|
|
42
|
-
* The Unix timestamp (in seconds) for when the
|
|
42
|
+
* The Unix timestamp (in seconds) for when the assistant file was created.
|
|
43
43
|
*/
|
|
44
44
|
created_at: number;
|
|
45
45
|
/**
|
|
@@ -48,7 +48,7 @@ export interface AssistantFile {
|
|
|
48
48
|
object: 'assistant.file';
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Deletes the association between the
|
|
51
|
+
* Deletes the association between the assistant and the file, but does not delete
|
|
52
52
|
* the [File](https://platform.openai.com/docs/api-reference/files) object itself.
|
|
53
53
|
*/
|
|
54
54
|
export interface FileDeleteResponse {
|
|
@@ -59,7 +59,7 @@ export interface FileDeleteResponse {
|
|
|
59
59
|
export interface FileCreateParams {
|
|
60
60
|
/**
|
|
61
61
|
* A [File](https://platform.openai.com/docs/api-reference/files) ID (with
|
|
62
|
-
* `purpose="assistants"`) that the
|
|
62
|
+
* `purpose="assistants"`) that the assistant should use. Useful for tools like
|
|
63
63
|
* `retrieval` and `code_interpreter` that can access files.
|
|
64
64
|
*/
|
|
65
65
|
file_id: string;
|
|
@@ -31,9 +31,9 @@ const FilesAPI = __importStar(require("openai/resources/beta/assistants/files"))
|
|
|
31
31
|
const pagination_1 = require("openai/pagination");
|
|
32
32
|
class Files extends resource_1.APIResource {
|
|
33
33
|
/**
|
|
34
|
-
* Create an
|
|
34
|
+
* Create an assistant file by attaching a
|
|
35
35
|
* [File](https://platform.openai.com/docs/api-reference/files) to an
|
|
36
|
-
* [
|
|
36
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants).
|
|
37
37
|
*/
|
|
38
38
|
create(assistantId, body, options) {
|
|
39
39
|
return this.post(`/assistants/${assistantId}/files`, {
|
|
@@ -62,7 +62,7 @@ class Files extends resource_1.APIResource {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* Delete an
|
|
65
|
+
* Delete an assistant file.
|
|
66
66
|
*/
|
|
67
67
|
del(assistantId, fileId, options) {
|
|
68
68
|
return this.delete(`/assistants/${assistantId}/files/${fileId}`, {
|
|
@@ -5,9 +5,9 @@ import * as FilesAPI from 'openai/resources/beta/assistants/files';
|
|
|
5
5
|
import { CursorPage } from 'openai/pagination';
|
|
6
6
|
export class Files extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Create an
|
|
8
|
+
* Create an assistant file by attaching a
|
|
9
9
|
* [File](https://platform.openai.com/docs/api-reference/files) to an
|
|
10
|
-
* [
|
|
10
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants).
|
|
11
11
|
*/
|
|
12
12
|
create(assistantId, body, options) {
|
|
13
13
|
return this.post(`/assistants/${assistantId}/files`, {
|
|
@@ -36,7 +36,7 @@ export class Files extends APIResource {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Delete an
|
|
39
|
+
* Delete an assistant file.
|
|
40
40
|
*/
|
|
41
41
|
del(assistantId, fileId, options) {
|
|
42
42
|
return this.delete(`/assistants/${assistantId}/files/${fileId}`, {
|
|
@@ -4,11 +4,11 @@ import * as FilesAPI from 'openai/resources/beta/threads/messages/files';
|
|
|
4
4
|
import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
5
5
|
export declare class Files extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Retrieves a
|
|
7
|
+
* Retrieves a message file.
|
|
8
8
|
*/
|
|
9
9
|
retrieve(threadId: string, messageId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<MessageFile>;
|
|
10
10
|
/**
|
|
11
|
-
* Returns a list of
|
|
11
|
+
* Returns a list of message files.
|
|
12
12
|
*/
|
|
13
13
|
list(threadId: string, messageId: string, query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<MessageFilesPage, MessageFile>;
|
|
14
14
|
list(threadId: string, messageId: string, options?: Core.RequestOptions): Core.PagePromise<MessageFilesPage, MessageFile>;
|
|
@@ -16,7 +16,7 @@ export declare class Files extends APIResource {
|
|
|
16
16
|
export declare class MessageFilesPage extends CursorPage<MessageFile> {
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* A list of
|
|
19
|
+
* A list of files attached to a `message`.
|
|
20
20
|
*/
|
|
21
21
|
export interface MessageFile {
|
|
22
22
|
/**
|
|
@@ -24,11 +24,11 @@ export interface MessageFile {
|
|
|
24
24
|
*/
|
|
25
25
|
id: string;
|
|
26
26
|
/**
|
|
27
|
-
* The Unix timestamp (in seconds) for when the
|
|
27
|
+
* The Unix timestamp (in seconds) for when the message file was created.
|
|
28
28
|
*/
|
|
29
29
|
created_at: number;
|
|
30
30
|
/**
|
|
31
|
-
* The ID of the [
|
|
31
|
+
* The ID of the [message](https://platform.openai.com/docs/api-reference/messages)
|
|
32
32
|
* that the [File](https://platform.openai.com/docs/api-reference/files) is
|
|
33
33
|
* attached to.
|
|
34
34
|
*/
|
|
@@ -31,7 +31,7 @@ const FilesAPI = __importStar(require("openai/resources/beta/threads/messages/fi
|
|
|
31
31
|
const pagination_1 = require("openai/pagination");
|
|
32
32
|
class Files extends resource_1.APIResource {
|
|
33
33
|
/**
|
|
34
|
-
* Retrieves a
|
|
34
|
+
* Retrieves a message file.
|
|
35
35
|
*/
|
|
36
36
|
retrieve(threadId, messageId, fileId, options) {
|
|
37
37
|
return this.get(`/threads/${threadId}/messages/${messageId}/files/${fileId}`, {
|
|
@@ -5,7 +5,7 @@ import * as FilesAPI from 'openai/resources/beta/threads/messages/files';
|
|
|
5
5
|
import { CursorPage } from 'openai/pagination';
|
|
6
6
|
export class Files extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Retrieves a
|
|
8
|
+
* Retrieves a message file.
|
|
9
9
|
*/
|
|
10
10
|
retrieve(threadId, messageId, fileId, options) {
|
|
11
11
|
return this.get(`/threads/${threadId}/messages/${messageId}/files/${fileId}`, {
|