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
|
@@ -36,7 +36,7 @@ class Runs extends resource_1.APIResource {
|
|
|
36
36
|
this.steps = new StepsAPI.Steps(this.client);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Create a
|
|
39
|
+
* Create a run.
|
|
40
40
|
*/
|
|
41
41
|
create(threadId, body, options) {
|
|
42
42
|
return this.post(`/threads/${threadId}/runs`, {
|
|
@@ -46,7 +46,7 @@ class Runs extends resource_1.APIResource {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Retrieves a
|
|
49
|
+
* Retrieves a run.
|
|
50
50
|
*/
|
|
51
51
|
retrieve(threadId, runId, options) {
|
|
52
52
|
return this.get(`/threads/${threadId}/runs/${runId}`, {
|
|
@@ -55,7 +55,7 @@ class Runs extends resource_1.APIResource {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Modifies a
|
|
58
|
+
* Modifies a run.
|
|
59
59
|
*/
|
|
60
60
|
update(threadId, runId, body, options) {
|
|
61
61
|
return this.post(`/threads/${threadId}/runs/${runId}`, {
|
|
@@ -75,7 +75,7 @@ class Runs extends resource_1.APIResource {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Cancels a
|
|
78
|
+
* Cancels a run that is `in_progress`.
|
|
79
79
|
*/
|
|
80
80
|
cancel(threadId, runId, options) {
|
|
81
81
|
return this.post(`/threads/${threadId}/runs/${runId}/cancel`, {
|
|
@@ -84,7 +84,7 @@ class Runs extends resource_1.APIResource {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
|
-
* When a
|
|
87
|
+
* When a run has the `status: "requires_action"` and `required_action.type` is
|
|
88
88
|
* `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
|
|
89
89
|
* tool calls once they're all completed. All outputs must be submitted in a single
|
|
90
90
|
* request.
|
|
@@ -10,7 +10,7 @@ export class Runs extends APIResource {
|
|
|
10
10
|
this.steps = new StepsAPI.Steps(this.client);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Create a
|
|
13
|
+
* Create a run.
|
|
14
14
|
*/
|
|
15
15
|
create(threadId, body, options) {
|
|
16
16
|
return this.post(`/threads/${threadId}/runs`, {
|
|
@@ -20,7 +20,7 @@ export class Runs extends APIResource {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Retrieves a
|
|
23
|
+
* Retrieves a run.
|
|
24
24
|
*/
|
|
25
25
|
retrieve(threadId, runId, options) {
|
|
26
26
|
return this.get(`/threads/${threadId}/runs/${runId}`, {
|
|
@@ -29,7 +29,7 @@ export class Runs extends APIResource {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Modifies a
|
|
32
|
+
* Modifies a run.
|
|
33
33
|
*/
|
|
34
34
|
update(threadId, runId, body, options) {
|
|
35
35
|
return this.post(`/threads/${threadId}/runs/${runId}`, {
|
|
@@ -49,7 +49,7 @@ export class Runs extends APIResource {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Cancels a
|
|
52
|
+
* Cancels a run that is `in_progress`.
|
|
53
53
|
*/
|
|
54
54
|
cancel(threadId, runId, options) {
|
|
55
55
|
return this.post(`/threads/${threadId}/runs/${runId}/cancel`, {
|
|
@@ -58,7 +58,7 @@ export class Runs extends APIResource {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* When a
|
|
61
|
+
* When a run has the `status: "requires_action"` and `required_action.type` is
|
|
62
62
|
* `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
|
|
63
63
|
* tool calls once they're all completed. All outputs must be submitted in a single
|
|
64
64
|
* request.
|
|
@@ -4,11 +4,11 @@ import * as StepsAPI from 'openai/resources/beta/threads/runs/steps';
|
|
|
4
4
|
import { CursorPage, type CursorPageParams } from 'openai/pagination';
|
|
5
5
|
export declare class Steps extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Retrieves a
|
|
7
|
+
* Retrieves a run step.
|
|
8
8
|
*/
|
|
9
9
|
retrieve(threadId: string, runId: string, stepId: string, options?: Core.RequestOptions): Core.APIPromise<RunStep>;
|
|
10
10
|
/**
|
|
11
|
-
* Returns a list of
|
|
11
|
+
* Returns a list of run steps belonging to a run.
|
|
12
12
|
*/
|
|
13
13
|
list(threadId: string, runId: string, query?: StepListParams, options?: Core.RequestOptions): Core.PagePromise<RunStepsPage, RunStep>;
|
|
14
14
|
list(threadId: string, runId: string, options?: Core.RequestOptions): Core.PagePromise<RunStepsPage, RunStep>;
|
|
@@ -16,7 +16,7 @@ export declare class Steps extends APIResource {
|
|
|
16
16
|
export declare class RunStepsPage extends CursorPage<RunStep> {
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Details of the Code Interpreter tool call the
|
|
19
|
+
* Details of the Code Interpreter tool call the run step was involved in.
|
|
20
20
|
*/
|
|
21
21
|
export interface CodeToolCall {
|
|
22
22
|
/**
|
|
@@ -24,7 +24,7 @@ export interface CodeToolCall {
|
|
|
24
24
|
*/
|
|
25
25
|
id: string;
|
|
26
26
|
/**
|
|
27
|
-
* The
|
|
27
|
+
* The Code Interpreter tool call definition.
|
|
28
28
|
*/
|
|
29
29
|
code_interpreter: CodeToolCall.CodeInterpreter;
|
|
30
30
|
/**
|
|
@@ -35,7 +35,7 @@ export interface CodeToolCall {
|
|
|
35
35
|
}
|
|
36
36
|
export declare namespace CodeToolCall {
|
|
37
37
|
/**
|
|
38
|
-
* The
|
|
38
|
+
* The Code Interpreter tool call definition.
|
|
39
39
|
*/
|
|
40
40
|
interface CodeInterpreter {
|
|
41
41
|
/**
|
|
@@ -51,7 +51,7 @@ export declare namespace CodeToolCall {
|
|
|
51
51
|
}
|
|
52
52
|
namespace CodeInterpreter {
|
|
53
53
|
/**
|
|
54
|
-
* Text output from the Code Interpreter tool call as part of a
|
|
54
|
+
* Text output from the Code Interpreter tool call as part of a run step.
|
|
55
55
|
*/
|
|
56
56
|
interface Logs {
|
|
57
57
|
/**
|
|
@@ -59,21 +59,21 @@ export declare namespace CodeToolCall {
|
|
|
59
59
|
*/
|
|
60
60
|
logs: string;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Always `logs`.
|
|
63
63
|
*/
|
|
64
64
|
type: 'logs';
|
|
65
65
|
}
|
|
66
66
|
interface Image {
|
|
67
67
|
image: Image.Image;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Always `image`.
|
|
70
70
|
*/
|
|
71
71
|
type: 'image';
|
|
72
72
|
}
|
|
73
73
|
namespace Image {
|
|
74
74
|
interface Image {
|
|
75
75
|
/**
|
|
76
|
-
* The [
|
|
76
|
+
* The [file](https://platform.openai.com/docs/api-reference/files) ID of the
|
|
77
77
|
* image.
|
|
78
78
|
*/
|
|
79
79
|
file_id: string;
|
|
@@ -118,19 +118,19 @@ export declare namespace FunctionToolCall {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* Details of the
|
|
121
|
+
* Details of the message creation by the run step.
|
|
122
122
|
*/
|
|
123
123
|
export interface MessageCreationStepDetails {
|
|
124
124
|
message_creation: MessageCreationStepDetails.MessageCreation;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* Always `message_creation``.
|
|
127
127
|
*/
|
|
128
128
|
type: 'message_creation';
|
|
129
129
|
}
|
|
130
130
|
export declare namespace MessageCreationStepDetails {
|
|
131
131
|
interface MessageCreation {
|
|
132
132
|
/**
|
|
133
|
-
* The ID of the
|
|
133
|
+
* The ID of the message that was created by this run step.
|
|
134
134
|
*/
|
|
135
135
|
message_id: string;
|
|
136
136
|
}
|
|
@@ -151,7 +151,7 @@ export interface RetrievalToolCall {
|
|
|
151
151
|
type: 'retrieval';
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
* Represents a
|
|
154
|
+
* Represents a step in execution of a run.
|
|
155
155
|
*/
|
|
156
156
|
export interface RunStep {
|
|
157
157
|
/**
|
|
@@ -160,33 +160,33 @@ export interface RunStep {
|
|
|
160
160
|
id: string;
|
|
161
161
|
/**
|
|
162
162
|
* The ID of the
|
|
163
|
-
* [
|
|
164
|
-
* associated with the
|
|
163
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants)
|
|
164
|
+
* associated with the run step.
|
|
165
165
|
*/
|
|
166
166
|
assistant_id: string;
|
|
167
167
|
/**
|
|
168
|
-
* The Unix timestamp (in seconds) for when the
|
|
168
|
+
* The Unix timestamp (in seconds) for when the run step was cancelled.
|
|
169
169
|
*/
|
|
170
170
|
cancelled_at: number | null;
|
|
171
171
|
/**
|
|
172
|
-
* The Unix timestamp (in seconds) for when the
|
|
172
|
+
* The Unix timestamp (in seconds) for when the run step completed.
|
|
173
173
|
*/
|
|
174
174
|
completed_at: number | null;
|
|
175
175
|
/**
|
|
176
|
-
* The Unix timestamp (in seconds) for when the
|
|
176
|
+
* The Unix timestamp (in seconds) for when the run step was created.
|
|
177
177
|
*/
|
|
178
178
|
created_at: number;
|
|
179
179
|
/**
|
|
180
|
-
* The Unix timestamp (in seconds) for when the
|
|
181
|
-
* considered expired if the parent
|
|
180
|
+
* The Unix timestamp (in seconds) for when the run step expired. A step is
|
|
181
|
+
* considered expired if the parent run is expired.
|
|
182
182
|
*/
|
|
183
183
|
expired_at: number | null;
|
|
184
184
|
/**
|
|
185
|
-
* The Unix timestamp (in seconds) for when the
|
|
185
|
+
* The Unix timestamp (in seconds) for when the run step failed.
|
|
186
186
|
*/
|
|
187
187
|
failed_at: number | null;
|
|
188
188
|
/**
|
|
189
|
-
* The last error associated with this
|
|
189
|
+
* The last error associated with this run step. Will be `null` if there are no
|
|
190
190
|
* errors.
|
|
191
191
|
*/
|
|
192
192
|
last_error: RunStep.LastError | null;
|
|
@@ -202,8 +202,8 @@ export interface RunStep {
|
|
|
202
202
|
*/
|
|
203
203
|
object: 'assistant.run.step';
|
|
204
204
|
/**
|
|
205
|
-
* The ID of the [
|
|
206
|
-
* this
|
|
205
|
+
* The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that
|
|
206
|
+
* this run step is a part of.
|
|
207
207
|
*/
|
|
208
208
|
run_id: string;
|
|
209
209
|
/**
|
|
@@ -212,22 +212,22 @@ export interface RunStep {
|
|
|
212
212
|
*/
|
|
213
213
|
status: 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired';
|
|
214
214
|
/**
|
|
215
|
-
* The details of the
|
|
215
|
+
* The details of the run step.
|
|
216
216
|
*/
|
|
217
217
|
step_details: MessageCreationStepDetails | ToolCallsStepDetails;
|
|
218
218
|
/**
|
|
219
|
-
* The ID of the [
|
|
220
|
-
* that was
|
|
219
|
+
* The ID of the [thread](https://platform.openai.com/docs/api-reference/threads)
|
|
220
|
+
* that was run.
|
|
221
221
|
*/
|
|
222
222
|
thread_id: string;
|
|
223
223
|
/**
|
|
224
|
-
* The type of
|
|
224
|
+
* The type of run step, which can be either `message_creation` or `tool_calls`.
|
|
225
225
|
*/
|
|
226
226
|
type: 'message_creation' | 'tool_calls';
|
|
227
227
|
}
|
|
228
228
|
export declare namespace RunStep {
|
|
229
229
|
/**
|
|
230
|
-
* The last error associated with this
|
|
230
|
+
* The last error associated with this run step. Will be `null` if there are no
|
|
231
231
|
* errors.
|
|
232
232
|
*/
|
|
233
233
|
interface LastError {
|
|
@@ -242,17 +242,17 @@ export declare namespace RunStep {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
|
-
* Details of the
|
|
245
|
+
* Details of the tool call.
|
|
246
246
|
*/
|
|
247
247
|
export interface ToolCallsStepDetails {
|
|
248
248
|
/**
|
|
249
|
-
* An array of tool calls the
|
|
249
|
+
* An array of tool calls the run step was involved in. These can be associated
|
|
250
250
|
* with one of three types of tools: `code_interpreter`, `retrieval`, or
|
|
251
251
|
* `function`.
|
|
252
252
|
*/
|
|
253
253
|
tool_calls: Array<CodeToolCall | RetrievalToolCall | FunctionToolCall>;
|
|
254
254
|
/**
|
|
255
|
-
*
|
|
255
|
+
* Always `tool_calls`.
|
|
256
256
|
*/
|
|
257
257
|
type: 'tool_calls';
|
|
258
258
|
}
|
|
@@ -31,7 +31,7 @@ const StepsAPI = __importStar(require("openai/resources/beta/threads/runs/steps"
|
|
|
31
31
|
const pagination_1 = require("openai/pagination");
|
|
32
32
|
class Steps extends resource_1.APIResource {
|
|
33
33
|
/**
|
|
34
|
-
* Retrieves a
|
|
34
|
+
* Retrieves a run step.
|
|
35
35
|
*/
|
|
36
36
|
retrieve(threadId, runId, stepId, options) {
|
|
37
37
|
return this.get(`/threads/${threadId}/runs/${runId}/steps/${stepId}`, {
|
|
@@ -5,7 +5,7 @@ import * as StepsAPI from 'openai/resources/beta/threads/runs/steps';
|
|
|
5
5
|
import { CursorPage } from 'openai/pagination';
|
|
6
6
|
export class Steps extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Retrieves a
|
|
8
|
+
* Retrieves a run step.
|
|
9
9
|
*/
|
|
10
10
|
retrieve(threadId, runId, stepId, options) {
|
|
11
11
|
return this.get(`/threads/${threadId}/runs/${runId}/steps/${stepId}`, {
|
|
@@ -7,29 +7,30 @@ export declare class Threads extends APIResource {
|
|
|
7
7
|
runs: RunsAPI.Runs;
|
|
8
8
|
messages: MessagesAPI.Messages;
|
|
9
9
|
/**
|
|
10
|
-
* Create a
|
|
10
|
+
* Create a thread.
|
|
11
11
|
*/
|
|
12
|
-
create(body
|
|
12
|
+
create(body?: ThreadCreateParams, options?: Core.RequestOptions): Core.APIPromise<Thread>;
|
|
13
|
+
create(options?: Core.RequestOptions): Core.APIPromise<Thread>;
|
|
13
14
|
/**
|
|
14
|
-
* Retrieves a
|
|
15
|
+
* Retrieves a thread.
|
|
15
16
|
*/
|
|
16
17
|
retrieve(threadId: string, options?: Core.RequestOptions): Core.APIPromise<Thread>;
|
|
17
18
|
/**
|
|
18
|
-
* Modifies a
|
|
19
|
+
* Modifies a thread.
|
|
19
20
|
*/
|
|
20
21
|
update(threadId: string, body: ThreadUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Thread>;
|
|
21
22
|
/**
|
|
22
|
-
* Delete a
|
|
23
|
+
* Delete a thread.
|
|
23
24
|
*/
|
|
24
25
|
del(threadId: string, options?: Core.RequestOptions): Core.APIPromise<ThreadDeleted>;
|
|
25
26
|
/**
|
|
26
|
-
* Create a
|
|
27
|
+
* Create a thread and run it in one request.
|
|
27
28
|
*/
|
|
28
29
|
createAndRun(body: ThreadCreateAndRunParams, options?: Core.RequestOptions): Core.APIPromise<RunsAPI.Run>;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
|
-
* Represents a
|
|
32
|
-
* [
|
|
32
|
+
* Represents a thread that contains
|
|
33
|
+
* [messages](https://platform.openai.com/docs/api-reference/messages).
|
|
33
34
|
*/
|
|
34
35
|
export interface Thread {
|
|
35
36
|
/**
|
|
@@ -37,7 +38,7 @@ export interface Thread {
|
|
|
37
38
|
*/
|
|
38
39
|
id: string;
|
|
39
40
|
/**
|
|
40
|
-
* The Unix timestamp (in seconds) for when the
|
|
41
|
+
* The Unix timestamp (in seconds) for when the thread was created.
|
|
41
42
|
*/
|
|
42
43
|
created_at: number;
|
|
43
44
|
/**
|
|
@@ -59,8 +60,8 @@ export interface ThreadDeleted {
|
|
|
59
60
|
}
|
|
60
61
|
export interface ThreadCreateParams {
|
|
61
62
|
/**
|
|
62
|
-
* A list of [
|
|
63
|
-
* start the
|
|
63
|
+
* A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
|
|
64
|
+
* start the thread with.
|
|
64
65
|
*/
|
|
65
66
|
messages?: Array<ThreadCreateParams.Message>;
|
|
66
67
|
/**
|
|
@@ -74,18 +75,18 @@ export interface ThreadCreateParams {
|
|
|
74
75
|
export declare namespace ThreadCreateParams {
|
|
75
76
|
interface Message {
|
|
76
77
|
/**
|
|
77
|
-
* The content of the
|
|
78
|
+
* The content of the message.
|
|
78
79
|
*/
|
|
79
80
|
content: string;
|
|
80
81
|
/**
|
|
81
|
-
* The role of the entity that is creating the
|
|
82
|
+
* The role of the entity that is creating the message. Currently only `user` is
|
|
82
83
|
* supported.
|
|
83
84
|
*/
|
|
84
85
|
role: 'user';
|
|
85
86
|
/**
|
|
86
87
|
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
87
|
-
* the
|
|
88
|
-
*
|
|
88
|
+
* the message should use. There can be a maximum of 10 files attached to a
|
|
89
|
+
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
89
90
|
* access and use files.
|
|
90
91
|
*/
|
|
91
92
|
file_ids?: Array<string>;
|
|
@@ -110,12 +111,12 @@ export interface ThreadUpdateParams {
|
|
|
110
111
|
export interface ThreadCreateAndRunParams {
|
|
111
112
|
/**
|
|
112
113
|
* The ID of the
|
|
113
|
-
* [
|
|
114
|
-
* execute this
|
|
114
|
+
* [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
|
|
115
|
+
* execute this run.
|
|
115
116
|
*/
|
|
116
117
|
assistant_id: string;
|
|
117
118
|
/**
|
|
118
|
-
* Override the default system message of the
|
|
119
|
+
* Override the default system message of the assistant. This is useful for
|
|
119
120
|
* modifying the behavior on a per-run basis.
|
|
120
121
|
*/
|
|
121
122
|
instructions?: string | null;
|
|
@@ -128,29 +129,29 @@ export interface ThreadCreateAndRunParams {
|
|
|
128
129
|
metadata?: unknown | null;
|
|
129
130
|
/**
|
|
130
131
|
* The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
|
|
131
|
-
* be used to execute this
|
|
132
|
-
* model associated with the
|
|
133
|
-
*
|
|
132
|
+
* be used to execute this run. If a value is provided here, it will override the
|
|
133
|
+
* model associated with the assistant. If not, the model associated with the
|
|
134
|
+
* assistant will be used.
|
|
134
135
|
*/
|
|
135
136
|
model?: string | null;
|
|
136
137
|
/**
|
|
137
|
-
* If no
|
|
138
|
+
* If no thread is provided, an empty thread will be created.
|
|
138
139
|
*/
|
|
139
140
|
thread?: ThreadCreateAndRunParams.Thread;
|
|
140
141
|
/**
|
|
141
|
-
* Override the tools the
|
|
142
|
+
* Override the tools the assistant can use for this run. This is useful for
|
|
142
143
|
* modifying the behavior on a per-run basis.
|
|
143
144
|
*/
|
|
144
145
|
tools?: Array<ThreadCreateAndRunParams.AssistantToolsCode | ThreadCreateAndRunParams.AssistantToolsRetrieval | ThreadCreateAndRunParams.AssistantToolsFunction> | null;
|
|
145
146
|
}
|
|
146
147
|
export declare namespace ThreadCreateAndRunParams {
|
|
147
148
|
/**
|
|
148
|
-
* If no
|
|
149
|
+
* If no thread is provided, an empty thread will be created.
|
|
149
150
|
*/
|
|
150
151
|
interface Thread {
|
|
151
152
|
/**
|
|
152
|
-
* A list of [
|
|
153
|
-
* start the
|
|
153
|
+
* A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
|
|
154
|
+
* start the thread with.
|
|
154
155
|
*/
|
|
155
156
|
messages?: Array<Thread.Message>;
|
|
156
157
|
/**
|
|
@@ -164,18 +165,18 @@ export declare namespace ThreadCreateAndRunParams {
|
|
|
164
165
|
namespace Thread {
|
|
165
166
|
interface Message {
|
|
166
167
|
/**
|
|
167
|
-
* The content of the
|
|
168
|
+
* The content of the message.
|
|
168
169
|
*/
|
|
169
170
|
content: string;
|
|
170
171
|
/**
|
|
171
|
-
* The role of the entity that is creating the
|
|
172
|
+
* The role of the entity that is creating the message. Currently only `user` is
|
|
172
173
|
* supported.
|
|
173
174
|
*/
|
|
174
175
|
role: 'user';
|
|
175
176
|
/**
|
|
176
177
|
* A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
177
|
-
* the
|
|
178
|
-
*
|
|
178
|
+
* the message should use. There can be a maximum of 10 files attached to a
|
|
179
|
+
* message. Useful for tools like `retrieval` and `code_interpreter` that can
|
|
179
180
|
* access and use files.
|
|
180
181
|
*/
|
|
181
182
|
file_ids?: Array<string>;
|
|
@@ -196,9 +197,9 @@ export declare namespace ThreadCreateAndRunParams {
|
|
|
196
197
|
}
|
|
197
198
|
interface AssistantToolsRetrieval {
|
|
198
199
|
/**
|
|
199
|
-
* The type of tool being defined: `
|
|
200
|
+
* The type of tool being defined: `retrieval`
|
|
200
201
|
*/
|
|
201
|
-
type: '
|
|
202
|
+
type: 'retrieval';
|
|
202
203
|
}
|
|
203
204
|
interface AssistantToolsFunction {
|
|
204
205
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,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
const resource_1 = require("openai/resource");
|
|
29
|
+
const core_1 = require("openai/core");
|
|
29
30
|
const MessagesAPI = __importStar(require("openai/resources/beta/threads/messages/messages"));
|
|
30
31
|
const RunsAPI = __importStar(require("openai/resources/beta/threads/runs/runs"));
|
|
31
32
|
class Threads extends resource_1.APIResource {
|
|
@@ -34,10 +35,10 @@ class Threads extends resource_1.APIResource {
|
|
|
34
35
|
this.runs = new RunsAPI.Runs(this.client);
|
|
35
36
|
this.messages = new MessagesAPI.Messages(this.client);
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
create(body = {}, options) {
|
|
39
|
+
if ((0, core_1.isRequestOptions)(body)) {
|
|
40
|
+
return this.create({}, body);
|
|
41
|
+
}
|
|
41
42
|
return this.post('/threads', {
|
|
42
43
|
body,
|
|
43
44
|
...options,
|
|
@@ -45,7 +46,7 @@ class Threads extends resource_1.APIResource {
|
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
|
-
* Retrieves a
|
|
49
|
+
* Retrieves a thread.
|
|
49
50
|
*/
|
|
50
51
|
retrieve(threadId, options) {
|
|
51
52
|
return this.get(`/threads/${threadId}`, {
|
|
@@ -54,7 +55,7 @@ class Threads extends resource_1.APIResource {
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
|
-
* Modifies a
|
|
58
|
+
* Modifies a thread.
|
|
58
59
|
*/
|
|
59
60
|
update(threadId, body, options) {
|
|
60
61
|
return this.post(`/threads/${threadId}`, {
|
|
@@ -64,7 +65,7 @@ class Threads extends resource_1.APIResource {
|
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
|
-
* Delete a
|
|
68
|
+
* Delete a thread.
|
|
68
69
|
*/
|
|
69
70
|
del(threadId, options) {
|
|
70
71
|
return this.delete(`/threads/${threadId}`, {
|
|
@@ -73,7 +74,7 @@ class Threads extends resource_1.APIResource {
|
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
|
-
* Create a
|
|
77
|
+
* Create a thread and run it in one request.
|
|
77
78
|
*/
|
|
78
79
|
createAndRun(body, options) {
|
|
79
80
|
return this.post('/threads/runs', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,8CAA8C;
|
|
1
|
+
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,8CAA8C;AAC9C,sCAA+C;AAE/C,6FAA+E;AAC/E,iFAAmE;AAEnE,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IA8DzE,CAAC;IAvDC,MAAM,CACJ,OAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC3B,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,QAAQ,EAAE,EAAE;YACtC,GAAG,OAAO;YACV,OAAO,EA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openai/core';
|
|
3
4
|
import * as MessagesAPI from 'openai/resources/beta/threads/messages/messages';
|
|
4
5
|
import * as RunsAPI from 'openai/resources/beta/threads/runs/runs';
|
|
5
6
|
export class Threads extends APIResource {
|
|
@@ -8,10 +9,10 @@ export class Threads extends APIResource {
|
|
|
8
9
|
this.runs = new RunsAPI.Runs(this.client);
|
|
9
10
|
this.messages = new MessagesAPI.Messages(this.client);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
create(body = {}, options) {
|
|
13
|
+
if (isRequestOptions(body)) {
|
|
14
|
+
return this.create({}, body);
|
|
15
|
+
}
|
|
15
16
|
return this.post('/threads', {
|
|
16
17
|
body,
|
|
17
18
|
...options,
|
|
@@ -19,7 +20,7 @@ export class Threads extends APIResource {
|
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
|
-
* Retrieves a
|
|
23
|
+
* Retrieves a thread.
|
|
23
24
|
*/
|
|
24
25
|
retrieve(threadId, options) {
|
|
25
26
|
return this.get(`/threads/${threadId}`, {
|
|
@@ -28,7 +29,7 @@ export class Threads extends APIResource {
|
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
|
-
* Modifies a
|
|
32
|
+
* Modifies a thread.
|
|
32
33
|
*/
|
|
33
34
|
update(threadId, body, options) {
|
|
34
35
|
return this.post(`/threads/${threadId}`, {
|
|
@@ -38,7 +39,7 @@ export class Threads extends APIResource {
|
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
|
-
* Delete a
|
|
42
|
+
* Delete a thread.
|
|
42
43
|
*/
|
|
43
44
|
del(threadId, options) {
|
|
44
45
|
return this.delete(`/threads/${threadId}`, {
|
|
@@ -47,7 +48,7 @@ export class Threads extends APIResource {
|
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
|
-
* Create a
|
|
51
|
+
* Create a thread and run it in one request.
|
|
51
52
|
*/
|
|
52
53
|
createAndRun(body, options) {
|
|
53
54
|
return this.post('/threads/runs', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;
|
|
1
|
+
{"version":3,"file":"threads.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/threads.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,gBAAgB,EAAE,MAAM,aAAa;OAEvC,KAAK,WAAW,MAAM,iDAAiD;OACvE,KAAK,OAAO,MAAM,yCAAyC;AAElE,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IA8DzE,CAAC;IAvDC,MAAM,CACJ,OAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC3B,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,QAAQ,EAAE,EAAE;YACtC,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OA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