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
|
@@ -8,7 +8,7 @@ import { CursorPage, type CursorPageParams } from "../../../../pagination";
|
|
|
8
8
|
|
|
9
9
|
export class Steps extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Retrieves a
|
|
11
|
+
* Retrieves a run step.
|
|
12
12
|
*/
|
|
13
13
|
retrieve(
|
|
14
14
|
threadId: string,
|
|
@@ -23,7 +23,7 @@ export class Steps extends APIResource {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Returns a list of
|
|
26
|
+
* Returns a list of run steps belonging to a run.
|
|
27
27
|
*/
|
|
28
28
|
list(
|
|
29
29
|
threadId: string,
|
|
@@ -56,7 +56,7 @@ export class Steps extends APIResource {
|
|
|
56
56
|
export class RunStepsPage extends CursorPage<RunStep> {}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* Details of the Code Interpreter tool call the
|
|
59
|
+
* Details of the Code Interpreter tool call the run step was involved in.
|
|
60
60
|
*/
|
|
61
61
|
export interface CodeToolCall {
|
|
62
62
|
/**
|
|
@@ -65,7 +65,7 @@ export interface CodeToolCall {
|
|
|
65
65
|
id: string;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* The
|
|
68
|
+
* The Code Interpreter tool call definition.
|
|
69
69
|
*/
|
|
70
70
|
code_interpreter: CodeToolCall.CodeInterpreter;
|
|
71
71
|
|
|
@@ -78,7 +78,7 @@ export interface CodeToolCall {
|
|
|
78
78
|
|
|
79
79
|
export namespace CodeToolCall {
|
|
80
80
|
/**
|
|
81
|
-
* The
|
|
81
|
+
* The Code Interpreter tool call definition.
|
|
82
82
|
*/
|
|
83
83
|
export interface CodeInterpreter {
|
|
84
84
|
/**
|
|
@@ -96,7 +96,7 @@ export namespace CodeToolCall {
|
|
|
96
96
|
|
|
97
97
|
export namespace CodeInterpreter {
|
|
98
98
|
/**
|
|
99
|
-
* Text output from the Code Interpreter tool call as part of a
|
|
99
|
+
* Text output from the Code Interpreter tool call as part of a run step.
|
|
100
100
|
*/
|
|
101
101
|
export interface Logs {
|
|
102
102
|
/**
|
|
@@ -105,7 +105,7 @@ export namespace CodeToolCall {
|
|
|
105
105
|
logs: string;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* Always `logs`.
|
|
109
109
|
*/
|
|
110
110
|
type: 'logs';
|
|
111
111
|
}
|
|
@@ -114,7 +114,7 @@ export namespace CodeToolCall {
|
|
|
114
114
|
image: Image.Image;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
117
|
+
* Always `image`.
|
|
118
118
|
*/
|
|
119
119
|
type: 'image';
|
|
120
120
|
}
|
|
@@ -122,7 +122,7 @@ export namespace CodeToolCall {
|
|
|
122
122
|
export namespace Image {
|
|
123
123
|
export interface Image {
|
|
124
124
|
/**
|
|
125
|
-
* The [
|
|
125
|
+
* The [file](https://platform.openai.com/docs/api-reference/files) ID of the
|
|
126
126
|
* image.
|
|
127
127
|
*/
|
|
128
128
|
file_id: string;
|
|
@@ -174,13 +174,13 @@ export namespace FunctionToolCall {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Details of the
|
|
177
|
+
* Details of the message creation by the run step.
|
|
178
178
|
*/
|
|
179
179
|
export interface MessageCreationStepDetails {
|
|
180
180
|
message_creation: MessageCreationStepDetails.MessageCreation;
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* Always `message_creation``.
|
|
184
184
|
*/
|
|
185
185
|
type: 'message_creation';
|
|
186
186
|
}
|
|
@@ -188,7 +188,7 @@ export interface MessageCreationStepDetails {
|
|
|
188
188
|
export namespace MessageCreationStepDetails {
|
|
189
189
|
export interface MessageCreation {
|
|
190
190
|
/**
|
|
191
|
-
* The ID of the
|
|
191
|
+
* The ID of the message that was created by this run step.
|
|
192
192
|
*/
|
|
193
193
|
message_id: string;
|
|
194
194
|
}
|
|
@@ -213,7 +213,7 @@ export interface RetrievalToolCall {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
|
-
* Represents a
|
|
216
|
+
* Represents a step in execution of a run.
|
|
217
217
|
*/
|
|
218
218
|
export interface RunStep {
|
|
219
219
|
/**
|
|
@@ -223,39 +223,39 @@ export interface RunStep {
|
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* The ID of the
|
|
226
|
-
* [
|
|
227
|
-
* associated with the
|
|
226
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants)
|
|
227
|
+
* associated with the run step.
|
|
228
228
|
*/
|
|
229
229
|
assistant_id: string;
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
|
-
* The Unix timestamp (in seconds) for when the
|
|
232
|
+
* The Unix timestamp (in seconds) for when the run step was cancelled.
|
|
233
233
|
*/
|
|
234
234
|
cancelled_at: number | null;
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
|
-
* The Unix timestamp (in seconds) for when the
|
|
237
|
+
* The Unix timestamp (in seconds) for when the run step completed.
|
|
238
238
|
*/
|
|
239
239
|
completed_at: number | null;
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
* The Unix timestamp (in seconds) for when the
|
|
242
|
+
* The Unix timestamp (in seconds) for when the run step was created.
|
|
243
243
|
*/
|
|
244
244
|
created_at: number;
|
|
245
245
|
|
|
246
246
|
/**
|
|
247
|
-
* The Unix timestamp (in seconds) for when the
|
|
248
|
-
* considered expired if the parent
|
|
247
|
+
* The Unix timestamp (in seconds) for when the run step expired. A step is
|
|
248
|
+
* considered expired if the parent run is expired.
|
|
249
249
|
*/
|
|
250
250
|
expired_at: number | null;
|
|
251
251
|
|
|
252
252
|
/**
|
|
253
|
-
* The Unix timestamp (in seconds) for when the
|
|
253
|
+
* The Unix timestamp (in seconds) for when the run step failed.
|
|
254
254
|
*/
|
|
255
255
|
failed_at: number | null;
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
|
-
* The last error associated with this
|
|
258
|
+
* The last error associated with this run step. Will be `null` if there are no
|
|
259
259
|
* errors.
|
|
260
260
|
*/
|
|
261
261
|
last_error: RunStep.LastError | null;
|
|
@@ -274,8 +274,8 @@ export interface RunStep {
|
|
|
274
274
|
object: 'assistant.run.step';
|
|
275
275
|
|
|
276
276
|
/**
|
|
277
|
-
* The ID of the [
|
|
278
|
-
* this
|
|
277
|
+
* The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that
|
|
278
|
+
* this run step is a part of.
|
|
279
279
|
*/
|
|
280
280
|
run_id: string;
|
|
281
281
|
|
|
@@ -286,25 +286,25 @@ export interface RunStep {
|
|
|
286
286
|
status: 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired';
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
|
-
* The details of the
|
|
289
|
+
* The details of the run step.
|
|
290
290
|
*/
|
|
291
291
|
step_details: MessageCreationStepDetails | ToolCallsStepDetails;
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
|
-
* The ID of the [
|
|
295
|
-
* that was
|
|
294
|
+
* The ID of the [thread](https://platform.openai.com/docs/api-reference/threads)
|
|
295
|
+
* that was run.
|
|
296
296
|
*/
|
|
297
297
|
thread_id: string;
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
|
-
* The type of
|
|
300
|
+
* The type of run step, which can be either `message_creation` or `tool_calls`.
|
|
301
301
|
*/
|
|
302
302
|
type: 'message_creation' | 'tool_calls';
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
export namespace RunStep {
|
|
306
306
|
/**
|
|
307
|
-
* The last error associated with this
|
|
307
|
+
* The last error associated with this run step. Will be `null` if there are no
|
|
308
308
|
* errors.
|
|
309
309
|
*/
|
|
310
310
|
export interface LastError {
|
|
@@ -321,18 +321,18 @@ export namespace RunStep {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
/**
|
|
324
|
-
* Details of the
|
|
324
|
+
* Details of the tool call.
|
|
325
325
|
*/
|
|
326
326
|
export interface ToolCallsStepDetails {
|
|
327
327
|
/**
|
|
328
|
-
* An array of tool calls the
|
|
328
|
+
* An array of tool calls the run step was involved in. These can be associated
|
|
329
329
|
* with one of three types of tools: `code_interpreter`, `retrieval`, or
|
|
330
330
|
* `function`.
|
|
331
331
|
*/
|
|
332
332
|
tool_calls: Array<CodeToolCall | RetrievalToolCall | FunctionToolCall>;
|
|
333
333
|
|
|
334
334
|
/**
|
|
335
|
-
*
|
|
335
|
+
* Always `tool_calls`.
|
|
336
336
|
*/
|
|
337
337
|
type: 'tool_calls';
|
|
338
338
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Core from "../../../core";
|
|
4
4
|
import { APIResource } from "../../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../../core";
|
|
5
6
|
import * as ThreadsAPI from "./threads";
|
|
6
7
|
import * as MessagesAPI from "./messages/messages";
|
|
7
8
|
import * as RunsAPI from "./runs/runs";
|
|
@@ -11,9 +12,17 @@ export class Threads extends APIResource {
|
|
|
11
12
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this.client);
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* Create a
|
|
15
|
+
* Create a thread.
|
|
15
16
|
*/
|
|
16
|
-
create(body
|
|
17
|
+
create(body?: ThreadCreateParams, options?: Core.RequestOptions): Core.APIPromise<Thread>;
|
|
18
|
+
create(options?: Core.RequestOptions): Core.APIPromise<Thread>;
|
|
19
|
+
create(
|
|
20
|
+
body: ThreadCreateParams | Core.RequestOptions = {},
|
|
21
|
+
options?: Core.RequestOptions,
|
|
22
|
+
): Core.APIPromise<Thread> {
|
|
23
|
+
if (isRequestOptions(body)) {
|
|
24
|
+
return this.create({}, body);
|
|
25
|
+
}
|
|
17
26
|
return this.post('/threads', {
|
|
18
27
|
body,
|
|
19
28
|
...options,
|
|
@@ -22,7 +31,7 @@ export class Threads extends APIResource {
|
|
|
22
31
|
}
|
|
23
32
|
|
|
24
33
|
/**
|
|
25
|
-
* Retrieves a
|
|
34
|
+
* Retrieves a thread.
|
|
26
35
|
*/
|
|
27
36
|
retrieve(threadId: string, options?: Core.RequestOptions): Core.APIPromise<Thread> {
|
|
28
37
|
return this.get(`/threads/${threadId}`, {
|
|
@@ -32,7 +41,7 @@ export class Threads extends APIResource {
|
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
/**
|
|
35
|
-
* Modifies a
|
|
44
|
+
* Modifies a thread.
|
|
36
45
|
*/
|
|
37
46
|
update(threadId: string, body: ThreadUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Thread> {
|
|
38
47
|
return this.post(`/threads/${threadId}`, {
|
|
@@ -43,7 +52,7 @@ export class Threads extends APIResource {
|
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
/**
|
|
46
|
-
* Delete a
|
|
55
|
+
* Delete a thread.
|
|
47
56
|
*/
|
|
48
57
|
del(threadId: string, options?: Core.RequestOptions): Core.APIPromise<ThreadDeleted> {
|
|
49
58
|
return this.delete(`/threads/${threadId}`, {
|
|
@@ -53,7 +62,7 @@ export class Threads extends APIResource {
|
|
|
53
62
|
}
|
|
54
63
|
|
|
55
64
|
/**
|
|
56
|
-
* Create a
|
|
65
|
+
* Create a thread and run it in one request.
|
|
57
66
|
*/
|
|
58
67
|
createAndRun(body: ThreadCreateAndRunParams, options?: Core.RequestOptions): Core.APIPromise<RunsAPI.Run> {
|
|
59
68
|
return this.post('/threads/runs', {
|
|
@@ -65,8 +74,8 @@ export class Threads extends APIResource {
|
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
/**
|
|
68
|
-
* Represents a
|
|
69
|
-
* [
|
|
77
|
+
* Represents a thread that contains
|
|
78
|
+
* [messages](https://platform.openai.com/docs/api-reference/messages).
|
|
70
79
|
*/
|
|
71
80
|
export interface Thread {
|
|
72
81
|
/**
|
|
@@ -75,7 +84,7 @@ export interface Thread {
|
|
|
75
84
|
id: string;
|
|
76
85
|
|
|
77
86
|
/**
|
|
78
|
-
* The Unix timestamp (in seconds) for when the
|
|
87
|
+
* The Unix timestamp (in seconds) for when the thread was created.
|
|
79
88
|
*/
|
|
80
89
|
created_at: number;
|
|
81
90
|
|
|
@@ -103,8 +112,8 @@ export interface ThreadDeleted {
|
|
|
103
112
|
|
|
104
113
|
export interface ThreadCreateParams {
|
|
105
114
|
/**
|
|
106
|
-
* A list of [
|
|
107
|
-
* start the
|
|
115
|
+
* A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
|
|
116
|
+
* start the thread with.
|
|
108
117
|
*/
|
|
109
118
|
messages?: Array<ThreadCreateParams.Message>;
|
|
110
119
|
|
|
@@ -120,20 +129,20 @@ export interface ThreadCreateParams {
|
|
|
120
129
|
export namespace ThreadCreateParams {
|
|
121
130
|
export interface Message {
|
|
122
131
|
/**
|
|
123
|
-
* The content of the
|
|
132
|
+
* The content of the message.
|
|
124
133
|
*/
|
|
125
134
|
content: string;
|
|
126
135
|
|
|
127
136
|
/**
|
|
128
|
-
* The role of the entity that is creating the
|
|
137
|
+
* The role of the entity that is creating the message. Currently only `user` is
|
|
129
138
|
* supported.
|
|
130
139
|
*/
|
|
131
140
|
role: 'user';
|
|
132
141
|
|
|
133
142
|
/**
|
|
134
143
|
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
135
|
-
* the
|
|
136
|
-
*
|
|
144
|
+
* the message should use. There can be a maximum of 10 files attached to a
|
|
145
|
+
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
137
146
|
* access and use files.
|
|
138
147
|
*/
|
|
139
148
|
file_ids?: Array<string>;
|
|
@@ -161,13 +170,13 @@ export interface ThreadUpdateParams {
|
|
|
161
170
|
export interface ThreadCreateAndRunParams {
|
|
162
171
|
/**
|
|
163
172
|
* The ID of the
|
|
164
|
-
* [
|
|
165
|
-
* execute this
|
|
173
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
|
|
174
|
+
* execute this run.
|
|
166
175
|
*/
|
|
167
176
|
assistant_id: string;
|
|
168
177
|
|
|
169
178
|
/**
|
|
170
|
-
* Override the default system message of the
|
|
179
|
+
* Override the default system message of the assistant. This is useful for
|
|
171
180
|
* modifying the behavior on a per-run basis.
|
|
172
181
|
*/
|
|
173
182
|
instructions?: string | null;
|
|
@@ -182,19 +191,19 @@ export interface ThreadCreateAndRunParams {
|
|
|
182
191
|
|
|
183
192
|
/**
|
|
184
193
|
* The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
|
|
185
|
-
* be used to execute this
|
|
186
|
-
* model associated with the
|
|
187
|
-
*
|
|
194
|
+
* be used to execute this run. If a value is provided here, it will override the
|
|
195
|
+
* model associated with the assistant. If not, the model associated with the
|
|
196
|
+
* assistant will be used.
|
|
188
197
|
*/
|
|
189
198
|
model?: string | null;
|
|
190
199
|
|
|
191
200
|
/**
|
|
192
|
-
* If no
|
|
201
|
+
* If no thread is provided, an empty thread will be created.
|
|
193
202
|
*/
|
|
194
203
|
thread?: ThreadCreateAndRunParams.Thread;
|
|
195
204
|
|
|
196
205
|
/**
|
|
197
|
-
* Override the tools the
|
|
206
|
+
* Override the tools the assistant can use for this run. This is useful for
|
|
198
207
|
* modifying the behavior on a per-run basis.
|
|
199
208
|
*/
|
|
200
209
|
tools?: Array<
|
|
@@ -206,12 +215,12 @@ export interface ThreadCreateAndRunParams {
|
|
|
206
215
|
|
|
207
216
|
export namespace ThreadCreateAndRunParams {
|
|
208
217
|
/**
|
|
209
|
-
* If no
|
|
218
|
+
* If no thread is provided, an empty thread will be created.
|
|
210
219
|
*/
|
|
211
220
|
export interface Thread {
|
|
212
221
|
/**
|
|
213
|
-
* A list of [
|
|
214
|
-
* start the
|
|
222
|
+
* A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
|
|
223
|
+
* start the thread with.
|
|
215
224
|
*/
|
|
216
225
|
messages?: Array<Thread.Message>;
|
|
217
226
|
|
|
@@ -227,20 +236,20 @@ export namespace ThreadCreateAndRunParams {
|
|
|
227
236
|
export namespace Thread {
|
|
228
237
|
export interface Message {
|
|
229
238
|
/**
|
|
230
|
-
* The content of the
|
|
239
|
+
* The content of the message.
|
|
231
240
|
*/
|
|
232
241
|
content: string;
|
|
233
242
|
|
|
234
243
|
/**
|
|
235
|
-
* The role of the entity that is creating the
|
|
244
|
+
* The role of the entity that is creating the message. Currently only `user` is
|
|
236
245
|
* supported.
|
|
237
246
|
*/
|
|
238
247
|
role: 'user';
|
|
239
248
|
|
|
240
249
|
/**
|
|
241
250
|
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
242
|
-
* the
|
|
243
|
-
*
|
|
251
|
+
* the message should use. There can be a maximum of 10 files attached to a
|
|
252
|
+
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
244
253
|
* access and use files.
|
|
245
254
|
*/
|
|
246
255
|
file_ids?: Array<string>;
|
|
@@ -264,9 +273,9 @@ export namespace ThreadCreateAndRunParams {
|
|
|
264
273
|
|
|
265
274
|
export interface AssistantToolsRetrieval {
|
|
266
275
|
/**
|
|
267
|
-
* The type of tool being defined: `
|
|
276
|
+
* The type of tool being defined: `retrieval`
|
|
268
277
|
*/
|
|
269
|
-
type: '
|
|
278
|
+
type: 'retrieval';
|
|
270
279
|
}
|
|
271
280
|
|
|
272
281
|
export interface AssistantToolsFunction {
|
|
@@ -177,6 +177,14 @@ export interface ChatCompletionChunk {
|
|
|
177
177
|
* The object type, which is always `chat.completion.chunk`.
|
|
178
178
|
*/
|
|
179
179
|
object: 'chat.completion.chunk';
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* This fingerprint represents the backend configuration that the model runs with.
|
|
183
|
+
*
|
|
184
|
+
* Can be used in conjunction with the `seed` request parameter to understand when
|
|
185
|
+
* backend changes have been made that might impact determinism.
|
|
186
|
+
*/
|
|
187
|
+
system_fingerprint?: string;
|
|
180
188
|
}
|
|
181
189
|
|
|
182
190
|
export namespace ChatCompletionChunk {
|
|
@@ -296,14 +304,14 @@ export interface ChatCompletionContentPartImage {
|
|
|
296
304
|
export namespace ChatCompletionContentPartImage {
|
|
297
305
|
export interface ImageURL {
|
|
298
306
|
/**
|
|
299
|
-
*
|
|
307
|
+
* Either a URL of the image or the base64 encoded image data.
|
|
300
308
|
*/
|
|
301
|
-
|
|
309
|
+
url: string;
|
|
302
310
|
|
|
303
311
|
/**
|
|
304
|
-
*
|
|
312
|
+
* Specifies the detail level of the image.
|
|
305
313
|
*/
|
|
306
|
-
|
|
314
|
+
detail?: 'auto' | 'low' | 'high';
|
|
307
315
|
}
|
|
308
316
|
}
|
|
309
317
|
|
|
@@ -579,6 +587,8 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
579
587
|
*/
|
|
580
588
|
model:
|
|
581
589
|
| (string & {})
|
|
590
|
+
| 'gpt-4-1106-preview'
|
|
591
|
+
| 'gpt-4-vision-preview'
|
|
582
592
|
| 'gpt-4'
|
|
583
593
|
| 'gpt-4-0314'
|
|
584
594
|
| 'gpt-4-0613'
|
|
@@ -28,9 +28,9 @@ export interface CreateEmbeddingResponse {
|
|
|
28
28
|
model: string;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* The object type, which is always "
|
|
31
|
+
* The object type, which is always "list".
|
|
32
32
|
*/
|
|
33
|
-
object: '
|
|
33
|
+
object: 'list';
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* The usage information for the request.
|
package/src/resources/files.ts
CHANGED
|
@@ -112,7 +112,7 @@ export interface FileDeleted {
|
|
|
112
112
|
*/
|
|
113
113
|
export interface FileObject {
|
|
114
114
|
/**
|
|
115
|
-
* The
|
|
115
|
+
* The file identifier, which can be referenced in the API endpoints.
|
|
116
116
|
*/
|
|
117
117
|
id: string;
|
|
118
118
|
|
|
@@ -122,12 +122,12 @@ export interface FileObject {
|
|
|
122
122
|
bytes: number;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* The Unix timestamp (in seconds) for when the
|
|
125
|
+
* The Unix timestamp (in seconds) for when the file was created.
|
|
126
126
|
*/
|
|
127
127
|
created_at: number;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* The name of the
|
|
130
|
+
* The name of the file.
|
|
131
131
|
*/
|
|
132
132
|
filename: string;
|
|
133
133
|
|
|
@@ -137,13 +137,13 @@ export interface FileObject {
|
|
|
137
137
|
object: 'file';
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
|
-
* The intended purpose of the
|
|
140
|
+
* The intended purpose of the file. Supported values are `fine-tune`,
|
|
141
141
|
* `fine-tune-results`, `assistants`, and `assistants_output`.
|
|
142
142
|
*/
|
|
143
143
|
purpose: 'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output';
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Deprecated. The current status of the
|
|
146
|
+
* Deprecated. The current status of the file, which can be either `uploaded`,
|
|
147
147
|
* `processed`, or `error`.
|
|
148
148
|
*/
|
|
149
149
|
status: 'uploaded' | 'processed' | 'error';
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.16.
|
|
1
|
+
export const VERSION = '4.16.2'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.16.
|
|
1
|
+
export declare const VERSION = "4.16.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.16.
|
|
1
|
+
export const VERSION = '4.16.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|