openai 4.16.0 → 4.16.2
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 +35 -0
- package/README.md +2 -2
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +2 -0
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +2 -0
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/assistants/assistants.d.ts +38 -38
- 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/assistants/index.d.ts +1 -1
- package/resources/beta/beta.d.ts +1 -1
- package/resources/beta/index.d.ts +1 -1
- 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 +33 -32
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +9 -8
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +9 -8
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions.d.ts +12 -5
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/embeddings.d.ts +2 -2
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/files.d.ts +5 -5
- package/src/lib/AbstractChatCompletionRunner.ts +4 -0
- package/src/resources/beta/assistants/assistants.ts +38 -38
- package/src/resources/beta/assistants/files.ts +9 -9
- package/src/resources/beta/assistants/index.ts +1 -1
- package/src/resources/beta/beta.ts +1 -1
- package/src/resources/beta/index.ts +1 -1
- 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 +41 -32
- package/src/resources/chat/completions.ts +14 -4
- package/src/resources/embeddings.ts +2 -2
- 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
|
@@ -136,6 +136,13 @@ export interface ChatCompletionChunk {
|
|
|
136
136
|
* The object type, which is always `chat.completion.chunk`.
|
|
137
137
|
*/
|
|
138
138
|
object: 'chat.completion.chunk';
|
|
139
|
+
/**
|
|
140
|
+
* This fingerprint represents the backend configuration that the model runs with.
|
|
141
|
+
*
|
|
142
|
+
* Can be used in conjunction with the `seed` request parameter to understand when
|
|
143
|
+
* backend changes have been made that might impact determinism.
|
|
144
|
+
*/
|
|
145
|
+
system_fingerprint?: string;
|
|
139
146
|
}
|
|
140
147
|
export declare namespace ChatCompletionChunk {
|
|
141
148
|
interface Choice {
|
|
@@ -236,13 +243,13 @@ export interface ChatCompletionContentPartImage {
|
|
|
236
243
|
export declare namespace ChatCompletionContentPartImage {
|
|
237
244
|
interface ImageURL {
|
|
238
245
|
/**
|
|
239
|
-
*
|
|
246
|
+
* Either a URL of the image or the base64 encoded image data.
|
|
240
247
|
*/
|
|
241
|
-
|
|
248
|
+
url: string;
|
|
242
249
|
/**
|
|
243
|
-
*
|
|
250
|
+
* Specifies the detail level of the image.
|
|
244
251
|
*/
|
|
245
|
-
|
|
252
|
+
detail?: 'auto' | 'low' | 'high';
|
|
246
253
|
}
|
|
247
254
|
}
|
|
248
255
|
export interface ChatCompletionContentPartText {
|
|
@@ -470,7 +477,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
470
477
|
* [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
|
|
471
478
|
* table for details on which models work with the Chat API.
|
|
472
479
|
*/
|
|
473
|
-
model: (string & {}) | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k-0613';
|
|
480
|
+
model: (string & {}) | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k-0613';
|
|
474
481
|
/**
|
|
475
482
|
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their
|
|
476
483
|
* existing frequency in the text so far, decreasing the model's likelihood to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAC;AAC/D,OAA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AAqD;;;AAIrD,8CAA8C;AAK9C,MAAa,WAAY,SAAQ,sBAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAxBD,kCAwBC;
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,8CAA8C;AAK9C,MAAa,WAAY,SAAQ,sBAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAxBD,kCAwBC;AAoyBD,WAAiB,WAAW;AA6B5B,CAAC,EA7BgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA6B3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;AAK7C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;AAK7C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAoyBD,WAAiB,WAAW;AA6B5B,CAAC,EA7BgB,WAAW,KAAX,WAAW,QA6B3B"}
|
|
@@ -17,9 +17,9 @@ export interface CreateEmbeddingResponse {
|
|
|
17
17
|
*/
|
|
18
18
|
model: string;
|
|
19
19
|
/**
|
|
20
|
-
* The object type, which is always "
|
|
20
|
+
* The object type, which is always "list".
|
|
21
21
|
*/
|
|
22
|
-
object: '
|
|
22
|
+
object: 'list';
|
|
23
23
|
/**
|
|
24
24
|
* The usage information for the request.
|
|
25
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,aAAa,MAAM,6BAA6B,CAAC;AAE7D,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;CAG5C;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAEvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"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OAGG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAErC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,UAAU,CAAC;IAC1B,MAAM,QAAQ,uBAAuB,GAAG,aAAa,CAAC,uBAAuB,CAAC;IAC9E,MAAM,QAAQ,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC;IAClD,MAAM,QAAQ,qBAAqB,GAAG,aAAa,CAAC,qBAAqB,CAAC;CAC3E"}
|
package/resources/files.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export interface FileDeleted {
|
|
|
58
58
|
*/
|
|
59
59
|
export interface FileObject {
|
|
60
60
|
/**
|
|
61
|
-
* The
|
|
61
|
+
* The file identifier, which can be referenced in the API endpoints.
|
|
62
62
|
*/
|
|
63
63
|
id: string;
|
|
64
64
|
/**
|
|
@@ -66,11 +66,11 @@ export interface FileObject {
|
|
|
66
66
|
*/
|
|
67
67
|
bytes: number;
|
|
68
68
|
/**
|
|
69
|
-
* The Unix timestamp (in seconds) for when the
|
|
69
|
+
* The Unix timestamp (in seconds) for when the file was created.
|
|
70
70
|
*/
|
|
71
71
|
created_at: number;
|
|
72
72
|
/**
|
|
73
|
-
* The name of the
|
|
73
|
+
* The name of the file.
|
|
74
74
|
*/
|
|
75
75
|
filename: string;
|
|
76
76
|
/**
|
|
@@ -78,12 +78,12 @@ export interface FileObject {
|
|
|
78
78
|
*/
|
|
79
79
|
object: 'file';
|
|
80
80
|
/**
|
|
81
|
-
* The intended purpose of the
|
|
81
|
+
* The intended purpose of the file. Supported values are `fine-tune`,
|
|
82
82
|
* `fine-tune-results`, `assistants`, and `assistants_output`.
|
|
83
83
|
*/
|
|
84
84
|
purpose: 'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output';
|
|
85
85
|
/**
|
|
86
|
-
* Deprecated. The current status of the
|
|
86
|
+
* Deprecated. The current status of the file, which can be either `uploaded`,
|
|
87
87
|
* `processed`, or `error`.
|
|
88
88
|
*/
|
|
89
89
|
status: 'uploaded' | 'processed' | 'error';
|
|
@@ -252,6 +252,8 @@ export abstract class AbstractChatCompletionRunner<
|
|
|
252
252
|
return message.function_call;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
+
|
|
256
|
+
return;
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
/**
|
|
@@ -270,6 +272,8 @@ export abstract class AbstractChatCompletionRunner<
|
|
|
270
272
|
return message.content as string;
|
|
271
273
|
}
|
|
272
274
|
}
|
|
275
|
+
|
|
276
|
+
return;
|
|
273
277
|
}
|
|
274
278
|
|
|
275
279
|
async finalFunctionCallResult(): Promise<string | undefined> {
|
|
@@ -11,7 +11,7 @@ export class Assistants extends APIResource {
|
|
|
11
11
|
files: FilesAPI.Files = new FilesAPI.Files(this.client);
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Create an
|
|
14
|
+
* Create an assistant with a model and instructions.
|
|
15
15
|
*/
|
|
16
16
|
create(body: AssistantCreateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant> {
|
|
17
17
|
return this.post('/assistants', {
|
|
@@ -22,7 +22,7 @@ export class Assistants extends APIResource {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Retrieves an
|
|
25
|
+
* Retrieves an assistant.
|
|
26
26
|
*/
|
|
27
27
|
retrieve(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<Assistant> {
|
|
28
28
|
return this.get(`/assistants/${assistantId}`, {
|
|
@@ -32,7 +32,7 @@ export class Assistants extends APIResource {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Modifies an
|
|
35
|
+
* Modifies an assistant.
|
|
36
36
|
*/
|
|
37
37
|
update(
|
|
38
38
|
assistantId: string,
|
|
@@ -47,7 +47,7 @@ export class Assistants extends APIResource {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Returns a list of
|
|
50
|
+
* Returns a list of assistants.
|
|
51
51
|
*/
|
|
52
52
|
list(
|
|
53
53
|
query?: AssistantListParams,
|
|
@@ -69,9 +69,9 @@ export class Assistants extends APIResource {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Delete an
|
|
72
|
+
* Delete an assistant.
|
|
73
73
|
*/
|
|
74
|
-
del(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
74
|
+
del(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<AssistantDeleted> {
|
|
75
75
|
return this.delete(`/assistants/${assistantId}`, {
|
|
76
76
|
...options,
|
|
77
77
|
headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers },
|
|
@@ -82,7 +82,7 @@ export class Assistants extends APIResource {
|
|
|
82
82
|
export class AssistantsPage extends CursorPage<Assistant> {}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Represents an `
|
|
85
|
+
* Represents an `assistant` that can call the model and use tools.
|
|
86
86
|
*/
|
|
87
87
|
export interface Assistant {
|
|
88
88
|
/**
|
|
@@ -91,24 +91,24 @@ export interface Assistant {
|
|
|
91
91
|
id: string;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* The Unix timestamp (in seconds) for when the
|
|
94
|
+
* The Unix timestamp (in seconds) for when the assistant was created.
|
|
95
95
|
*/
|
|
96
96
|
created_at: number;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* The description of the
|
|
99
|
+
* The description of the assistant. The maximum length is 512 characters.
|
|
100
100
|
*/
|
|
101
101
|
description: string | null;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* A list of [
|
|
105
|
-
* attached to this
|
|
106
|
-
*
|
|
104
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
|
|
105
|
+
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
106
|
+
* assistant. Files are ordered by their creation date in ascending order.
|
|
107
107
|
*/
|
|
108
108
|
file_ids: Array<string>;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
* The system instructions that the
|
|
111
|
+
* The system instructions that the assistant uses. The maximum length is 32768
|
|
112
112
|
* characters.
|
|
113
113
|
*/
|
|
114
114
|
instructions: string | null;
|
|
@@ -131,7 +131,7 @@ export interface Assistant {
|
|
|
131
131
|
model: string;
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
|
-
* The name of the
|
|
134
|
+
* The name of the assistant. The maximum length is 256 characters.
|
|
135
135
|
*/
|
|
136
136
|
name: string | null;
|
|
137
137
|
|
|
@@ -141,10 +141,10 @@ export interface Assistant {
|
|
|
141
141
|
object: 'assistant';
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
* A list of tool enabled on the
|
|
144
|
+
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
145
145
|
* assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.
|
|
146
146
|
*/
|
|
147
|
-
tools: Array<Assistant.CodeInterpreter | Assistant.
|
|
147
|
+
tools: Array<Assistant.CodeInterpreter | Assistant.Retrieval | Assistant.Function>;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
export namespace Assistant {
|
|
@@ -155,11 +155,11 @@ export namespace Assistant {
|
|
|
155
155
|
type: 'code_interpreter';
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
export interface
|
|
158
|
+
export interface Retrieval {
|
|
159
159
|
/**
|
|
160
|
-
* The type of tool being defined: `
|
|
160
|
+
* The type of tool being defined: `retrieval`
|
|
161
161
|
*/
|
|
162
|
-
type: '
|
|
162
|
+
type: 'retrieval';
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
export interface Function {
|
|
@@ -206,7 +206,7 @@ export namespace Assistant {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
export interface
|
|
209
|
+
export interface AssistantDeleted {
|
|
210
210
|
id: string;
|
|
211
211
|
|
|
212
212
|
deleted: boolean;
|
|
@@ -225,19 +225,19 @@ export interface AssistantCreateParams {
|
|
|
225
225
|
model: string;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* The description of the
|
|
228
|
+
* The description of the assistant. The maximum length is 512 characters.
|
|
229
229
|
*/
|
|
230
230
|
description?: string | null;
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
|
-
* A list of [
|
|
234
|
-
* attached to this
|
|
235
|
-
*
|
|
233
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
|
|
234
|
+
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
235
|
+
* assistant. Files are ordered by their creation date in ascending order.
|
|
236
236
|
*/
|
|
237
237
|
file_ids?: Array<string>;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
|
-
* The system instructions that the
|
|
240
|
+
* The system instructions that the assistant uses. The maximum length is 32768
|
|
241
241
|
* characters.
|
|
242
242
|
*/
|
|
243
243
|
instructions?: string | null;
|
|
@@ -251,12 +251,12 @@ export interface AssistantCreateParams {
|
|
|
251
251
|
metadata?: unknown | null;
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
|
-
* The name of the
|
|
254
|
+
* The name of the assistant. The maximum length is 256 characters.
|
|
255
255
|
*/
|
|
256
256
|
name?: string | null;
|
|
257
257
|
|
|
258
258
|
/**
|
|
259
|
-
* A list of tool enabled on the
|
|
259
|
+
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
260
260
|
* assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.
|
|
261
261
|
*/
|
|
262
262
|
tools?: Array<
|
|
@@ -276,9 +276,9 @@ export namespace AssistantCreateParams {
|
|
|
276
276
|
|
|
277
277
|
export interface AssistantToolsRetrieval {
|
|
278
278
|
/**
|
|
279
|
-
* The type of tool being defined: `
|
|
279
|
+
* The type of tool being defined: `retrieval`
|
|
280
280
|
*/
|
|
281
|
-
type: '
|
|
281
|
+
type: 'retrieval';
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
export interface AssistantToolsFunction {
|
|
@@ -327,21 +327,21 @@ export namespace AssistantCreateParams {
|
|
|
327
327
|
|
|
328
328
|
export interface AssistantUpdateParams {
|
|
329
329
|
/**
|
|
330
|
-
* The description of the
|
|
330
|
+
* The description of the assistant. The maximum length is 512 characters.
|
|
331
331
|
*/
|
|
332
332
|
description?: string | null;
|
|
333
333
|
|
|
334
334
|
/**
|
|
335
335
|
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs
|
|
336
|
-
* attached to this
|
|
337
|
-
*
|
|
336
|
+
* attached to this assistant. There can be a maximum of 20 files attached to the
|
|
337
|
+
* assistant. Files are ordered by their creation date in ascending order. If a
|
|
338
338
|
* file was previosuly attached to the list but does not show up in the list, it
|
|
339
339
|
* will be deleted from the assistant.
|
|
340
340
|
*/
|
|
341
341
|
file_ids?: Array<string>;
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
|
-
* The system instructions that the
|
|
344
|
+
* The system instructions that the assistant uses. The maximum length is 32768
|
|
345
345
|
* characters.
|
|
346
346
|
*/
|
|
347
347
|
instructions?: string | null;
|
|
@@ -364,12 +364,12 @@ export interface AssistantUpdateParams {
|
|
|
364
364
|
model?: string;
|
|
365
365
|
|
|
366
366
|
/**
|
|
367
|
-
* The name of the
|
|
367
|
+
* The name of the assistant. The maximum length is 256 characters.
|
|
368
368
|
*/
|
|
369
369
|
name?: string | null;
|
|
370
370
|
|
|
371
371
|
/**
|
|
372
|
-
* A list of tool enabled on the
|
|
372
|
+
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
373
373
|
* assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.
|
|
374
374
|
*/
|
|
375
375
|
tools?: Array<
|
|
@@ -389,9 +389,9 @@ export namespace AssistantUpdateParams {
|
|
|
389
389
|
|
|
390
390
|
export interface AssistantToolsRetrieval {
|
|
391
391
|
/**
|
|
392
|
-
* The type of tool being defined: `
|
|
392
|
+
* The type of tool being defined: `retrieval`
|
|
393
393
|
*/
|
|
394
|
-
type: '
|
|
394
|
+
type: 'retrieval';
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
export interface AssistantToolsFunction {
|
|
@@ -456,7 +456,7 @@ export interface AssistantListParams extends CursorPageParams {
|
|
|
456
456
|
|
|
457
457
|
export namespace Assistants {
|
|
458
458
|
export import Assistant = AssistantsAPI.Assistant;
|
|
459
|
-
export import
|
|
459
|
+
export import AssistantDeleted = AssistantsAPI.AssistantDeleted;
|
|
460
460
|
export import AssistantsPage = AssistantsAPI.AssistantsPage;
|
|
461
461
|
export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams;
|
|
462
462
|
export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams;
|
|
@@ -8,9 +8,9 @@ import { CursorPage, type CursorPageParams } from "../../../pagination";
|
|
|
8
8
|
|
|
9
9
|
export class Files extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Create an
|
|
11
|
+
* Create an assistant file by attaching a
|
|
12
12
|
* [File](https://platform.openai.com/docs/api-reference/files) to an
|
|
13
|
-
* [
|
|
13
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants).
|
|
14
14
|
*/
|
|
15
15
|
create(
|
|
16
16
|
assistantId: string,
|
|
@@ -39,7 +39,7 @@ export class Files extends APIResource {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Returns a list of
|
|
42
|
+
* Returns a list of assistant files.
|
|
43
43
|
*/
|
|
44
44
|
list(
|
|
45
45
|
assistantId: string,
|
|
@@ -66,7 +66,7 @@ export class Files extends APIResource {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* Delete an
|
|
69
|
+
* Delete an assistant file.
|
|
70
70
|
*/
|
|
71
71
|
del(
|
|
72
72
|
assistantId: string,
|
|
@@ -84,7 +84,7 @@ export class AssistantFilesPage extends CursorPage<AssistantFile> {}
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* A list of [Files](https://platform.openai.com/docs/api-reference/files) attached
|
|
87
|
-
* to an `
|
|
87
|
+
* to an `assistant`.
|
|
88
88
|
*/
|
|
89
89
|
export interface AssistantFile {
|
|
90
90
|
/**
|
|
@@ -93,12 +93,12 @@ export interface AssistantFile {
|
|
|
93
93
|
id: string;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* The
|
|
96
|
+
* The assistant ID that the file is attached to.
|
|
97
97
|
*/
|
|
98
98
|
assistant_id: string;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* The Unix timestamp (in seconds) for when the
|
|
101
|
+
* The Unix timestamp (in seconds) for when the assistant file was created.
|
|
102
102
|
*/
|
|
103
103
|
created_at: number;
|
|
104
104
|
|
|
@@ -109,7 +109,7 @@ export interface AssistantFile {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
* Deletes the association between the
|
|
112
|
+
* Deletes the association between the assistant and the file, but does not delete
|
|
113
113
|
* the [File](https://platform.openai.com/docs/api-reference/files) object itself.
|
|
114
114
|
*/
|
|
115
115
|
export interface FileDeleteResponse {
|
|
@@ -123,7 +123,7 @@ export interface FileDeleteResponse {
|
|
|
123
123
|
export interface FileCreateParams {
|
|
124
124
|
/**
|
|
125
125
|
* A [File](https://platform.openai.com/docs/api-reference/files) ID (with
|
|
126
|
-
* `purpose="assistants"`) that the
|
|
126
|
+
* `purpose="assistants"`) that the assistant should use. Useful for tools like
|
|
127
127
|
* `retrieval` and `code_interpreter` that can access files.
|
|
128
128
|
*/
|
|
129
129
|
file_id: string;
|
|
@@ -15,7 +15,7 @@ export namespace Beta {
|
|
|
15
15
|
export import Chat = ChatAPI.Chat;
|
|
16
16
|
export import Assistants = AssistantsAPI.Assistants;
|
|
17
17
|
export import Assistant = AssistantsAPI.Assistant;
|
|
18
|
-
export import
|
|
18
|
+
export import AssistantDeleted = AssistantsAPI.AssistantDeleted;
|
|
19
19
|
export import AssistantsPage = AssistantsAPI.AssistantsPage;
|
|
20
20
|
export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams;
|
|
21
21
|
export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams;
|
|
@@ -8,7 +8,7 @@ import { CursorPage, type CursorPageParams } from "../../../../pagination";
|
|
|
8
8
|
|
|
9
9
|
export class Files extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Retrieves a
|
|
11
|
+
* Retrieves a message file.
|
|
12
12
|
*/
|
|
13
13
|
retrieve(
|
|
14
14
|
threadId: string,
|
|
@@ -23,7 +23,7 @@ export class Files extends APIResource {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Returns a list of
|
|
26
|
+
* Returns a list of message files.
|
|
27
27
|
*/
|
|
28
28
|
list(
|
|
29
29
|
threadId: string,
|
|
@@ -56,7 +56,7 @@ export class Files extends APIResource {
|
|
|
56
56
|
export class MessageFilesPage extends CursorPage<MessageFile> {}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* A list of
|
|
59
|
+
* A list of files attached to a `message`.
|
|
60
60
|
*/
|
|
61
61
|
export interface MessageFile {
|
|
62
62
|
/**
|
|
@@ -65,12 +65,12 @@ export interface MessageFile {
|
|
|
65
65
|
id: string;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* The Unix timestamp (in seconds) for when the
|
|
68
|
+
* The Unix timestamp (in seconds) for when the message file was created.
|
|
69
69
|
*/
|
|
70
70
|
created_at: number;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* The ID of the [
|
|
73
|
+
* The ID of the [message](https://platform.openai.com/docs/api-reference/messages)
|
|
74
74
|
* that the [File](https://platform.openai.com/docs/api-reference/files) is
|
|
75
75
|
* attached to.
|
|
76
76
|
*/
|