openai 4.28.4 → 4.29.0
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 +7 -10
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/lib/AbstractAssistantStreamRunner.d.ts +74 -0
- package/lib/AbstractAssistantStreamRunner.d.ts.map +1 -0
- package/lib/AbstractAssistantStreamRunner.js +246 -0
- package/lib/AbstractAssistantStreamRunner.js.map +1 -0
- package/lib/AbstractAssistantStreamRunner.mjs +242 -0
- package/lib/AbstractAssistantStreamRunner.mjs.map +1 -0
- package/lib/AssistantStream.d.ts +56 -0
- package/lib/AssistantStream.d.ts.map +1 -0
- package/lib/AssistantStream.js +526 -0
- package/lib/AssistantStream.js.map +1 -0
- package/lib/AssistantStream.mjs +499 -0
- package/lib/AssistantStream.mjs.map +1 -0
- package/lib/ChatCompletionRunFunctions.test.js +35 -0
- package/lib/ChatCompletionRunFunctions.test.js.map +1 -1
- package/lib/ChatCompletionRunFunctions.test.mjs +35 -0
- package/lib/ChatCompletionRunFunctions.test.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +21 -3
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +21 -3
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audio/speech.d.ts +3 -6
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/speech.js.map +1 -1
- package/resources/audio/speech.mjs.map +1 -1
- package/resources/audio/transcriptions.d.ts +14 -4
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.ts +2 -1
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/beta/assistants/assistants.d.ts +629 -60
- package/resources/beta/assistants/assistants.d.ts.map +1 -1
- package/resources/beta/assistants/assistants.js.map +1 -1
- package/resources/beta/assistants/assistants.mjs.map +1 -1
- package/resources/beta/assistants/index.d.ts +1 -1
- package/resources/beta/assistants/index.d.ts.map +1 -1
- package/resources/beta/assistants/index.js.map +1 -1
- package/resources/beta/assistants/index.mjs.map +1 -1
- package/resources/beta/beta.d.ts +12 -0
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/threads/index.d.ts +3 -3
- package/resources/beta/threads/index.d.ts.map +1 -1
- package/resources/beta/threads/index.js +2 -2
- package/resources/beta/threads/index.js.map +1 -1
- package/resources/beta/threads/index.mjs +1 -1
- package/resources/beta/threads/index.mjs.map +1 -1
- package/resources/beta/threads/messages/index.d.ts +1 -1
- package/resources/beta/threads/messages/index.d.ts.map +1 -1
- package/resources/beta/threads/messages/index.js +2 -2
- package/resources/beta/threads/messages/index.js.map +1 -1
- package/resources/beta/threads/messages/index.mjs +1 -1
- package/resources/beta/threads/messages/index.mjs.map +1 -1
- package/resources/beta/threads/messages/messages.d.ts +289 -86
- package/resources/beta/threads/messages/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages/messages.js +5 -5
- package/resources/beta/threads/messages/messages.js.map +1 -1
- package/resources/beta/threads/messages/messages.mjs +3 -3
- package/resources/beta/threads/messages/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/index.d.ts +2 -2
- package/resources/beta/threads/runs/index.d.ts.map +1 -1
- package/resources/beta/threads/runs/index.js.map +1 -1
- package/resources/beta/threads/runs/index.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +153 -49
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js +14 -7
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs +14 -7
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +219 -5
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/runs/steps.js.map +1 -1
- package/resources/beta/threads/runs/steps.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +144 -22
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +9 -4
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +9 -4
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions.d.ts +28 -18
- 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/completions.d.ts +2 -0
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs.map +1 -1
- package/resources/files.d.ts +4 -4
- package/resources/images.d.ts +6 -3
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs.map +1 -1
- package/resources/moderations.d.ts +3 -5
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +1 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +1 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/shared.d.ts +6 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/index.ts +1 -0
- package/src/lib/AbstractAssistantStreamRunner.ts +340 -0
- package/src/lib/AssistantStream.ts +698 -0
- package/src/lib/ChatCompletionRunFunctions.test.ts +52 -1
- package/src/lib/ChatCompletionStream.ts +29 -6
- package/src/resources/audio/speech.ts +3 -6
- package/src/resources/audio/transcriptions.ts +14 -4
- package/src/resources/audio/translations.ts +2 -1
- package/src/resources/beta/assistants/assistants.ts +768 -76
- package/src/resources/beta/assistants/index.ts +9 -0
- package/src/resources/beta/beta.ts +12 -0
- package/src/resources/beta/index.ts +12 -0
- package/src/resources/beta/threads/index.ts +30 -5
- package/src/resources/beta/threads/messages/index.ts +21 -5
- package/src/resources/beta/threads/messages/messages.ts +332 -94
- package/src/resources/beta/threads/runs/index.ts +18 -1
- package/src/resources/beta/threads/runs/runs.ts +225 -60
- package/src/resources/beta/threads/runs/steps.ts +254 -5
- package/src/resources/beta/threads/threads.ts +182 -25
- package/src/resources/chat/completions.ts +28 -18
- package/src/resources/completions.ts +2 -0
- package/src/resources/files.ts +4 -4
- package/src/resources/images.ts +6 -3
- package/src/resources/moderations.ts +3 -5
- package/src/resources/shared.ts +10 -0
- package/src/streaming.ts +31 -0
- package/src/version.ts +1 -1
- package/streaming.d.ts +2 -0
- package/streaming.d.ts.map +1 -1
- package/streaming.js +32 -1
- package/streaming.js.map +1 -1
- package/streaming.mjs +30 -0
- package/streaming.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -8,124 +8,198 @@ export declare class Messages extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Create a message.
|
|
10
10
|
*/
|
|
11
|
-
create(threadId: string, body: MessageCreateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
11
|
+
create(threadId: string, body: MessageCreateParams, options?: Core.RequestOptions): Core.APIPromise<Message>;
|
|
12
12
|
/**
|
|
13
13
|
* Retrieve a message.
|
|
14
14
|
*/
|
|
15
|
-
retrieve(threadId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
15
|
+
retrieve(threadId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise<Message>;
|
|
16
16
|
/**
|
|
17
17
|
* Modifies a message.
|
|
18
18
|
*/
|
|
19
|
-
update(threadId: string, messageId: string, body: MessageUpdateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
19
|
+
update(threadId: string, messageId: string, body: MessageUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Message>;
|
|
20
20
|
/**
|
|
21
21
|
* Returns a list of messages for a given thread.
|
|
22
22
|
*/
|
|
23
|
-
list(threadId: string, query?: MessageListParams, options?: Core.RequestOptions): Core.PagePromise<
|
|
24
|
-
list(threadId: string, options?: Core.RequestOptions): Core.PagePromise<
|
|
23
|
+
list(threadId: string, query?: MessageListParams, options?: Core.RequestOptions): Core.PagePromise<MessagesPage, Message>;
|
|
24
|
+
list(threadId: string, options?: Core.RequestOptions): Core.PagePromise<MessagesPage, Message>;
|
|
25
25
|
}
|
|
26
|
-
export declare class
|
|
26
|
+
export declare class MessagesPage extends CursorPage<Message> {
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* A citation within the message that points to a specific quote from a specific
|
|
30
|
+
* File associated with the assistant or the message. Generated when the assistant
|
|
31
|
+
* uses the "retrieval" tool to search files.
|
|
31
32
|
*/
|
|
32
|
-
export
|
|
33
|
-
|
|
33
|
+
export type Annotation = FileCitationAnnotation | FilePathAnnotation;
|
|
34
|
+
/**
|
|
35
|
+
* A citation within the message that points to a specific quote from a specific
|
|
36
|
+
* File associated with the assistant or the message. Generated when the assistant
|
|
37
|
+
* uses the "retrieval" tool to search files.
|
|
38
|
+
*/
|
|
39
|
+
export type AnnotationDelta = FileCitationDeltaAnnotation | FilePathDeltaAnnotation;
|
|
40
|
+
/**
|
|
41
|
+
* A citation within the message that points to a specific quote from a specific
|
|
42
|
+
* File associated with the assistant or the message. Generated when the assistant
|
|
43
|
+
* uses the "retrieval" tool to search files.
|
|
44
|
+
*/
|
|
45
|
+
export interface FileCitationAnnotation {
|
|
46
|
+
end_index: number;
|
|
47
|
+
file_citation: FileCitationAnnotation.FileCitation;
|
|
48
|
+
start_index: number;
|
|
34
49
|
/**
|
|
35
|
-
*
|
|
50
|
+
* The text in the message content that needs to be replaced.
|
|
36
51
|
*/
|
|
37
|
-
|
|
52
|
+
text: string;
|
|
53
|
+
/**
|
|
54
|
+
* Always `file_citation`.
|
|
55
|
+
*/
|
|
56
|
+
type: 'file_citation';
|
|
38
57
|
}
|
|
39
|
-
export declare namespace
|
|
40
|
-
interface
|
|
58
|
+
export declare namespace FileCitationAnnotation {
|
|
59
|
+
interface FileCitation {
|
|
41
60
|
/**
|
|
42
|
-
* The
|
|
43
|
-
* in the message content.
|
|
61
|
+
* The ID of the specific File the citation is from.
|
|
44
62
|
*/
|
|
45
63
|
file_id: string;
|
|
64
|
+
/**
|
|
65
|
+
* The specific quote in the file.
|
|
66
|
+
*/
|
|
67
|
+
quote: string;
|
|
46
68
|
}
|
|
47
69
|
}
|
|
48
70
|
/**
|
|
49
|
-
*
|
|
71
|
+
* A citation within the message that points to a specific quote from a specific
|
|
72
|
+
* File associated with the assistant or the message. Generated when the assistant
|
|
73
|
+
* uses the "retrieval" tool to search files.
|
|
50
74
|
*/
|
|
51
|
-
export interface
|
|
52
|
-
text: MessageContentText.Text;
|
|
75
|
+
export interface FileCitationDeltaAnnotation {
|
|
53
76
|
/**
|
|
54
|
-
*
|
|
77
|
+
* The index of the annotation in the text content part.
|
|
55
78
|
*/
|
|
56
|
-
|
|
79
|
+
index: number;
|
|
80
|
+
/**
|
|
81
|
+
* Always `file_citation`.
|
|
82
|
+
*/
|
|
83
|
+
type: 'file_citation';
|
|
84
|
+
end_index?: number;
|
|
85
|
+
file_citation?: FileCitationDeltaAnnotation.FileCitation;
|
|
86
|
+
start_index?: number;
|
|
87
|
+
/**
|
|
88
|
+
* The text in the message content that needs to be replaced.
|
|
89
|
+
*/
|
|
90
|
+
text?: string;
|
|
57
91
|
}
|
|
58
|
-
export declare namespace
|
|
59
|
-
interface
|
|
60
|
-
|
|
92
|
+
export declare namespace FileCitationDeltaAnnotation {
|
|
93
|
+
interface FileCitation {
|
|
94
|
+
/**
|
|
95
|
+
* The ID of the specific File the citation is from.
|
|
96
|
+
*/
|
|
97
|
+
file_id?: string;
|
|
61
98
|
/**
|
|
62
|
-
* The
|
|
99
|
+
* The specific quote in the file.
|
|
63
100
|
*/
|
|
64
|
-
|
|
101
|
+
quote?: string;
|
|
65
102
|
}
|
|
66
|
-
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* A URL for the file that's generated when the assistant used the
|
|
106
|
+
* `code_interpreter` tool to generate a file.
|
|
107
|
+
*/
|
|
108
|
+
export interface FilePathAnnotation {
|
|
109
|
+
end_index: number;
|
|
110
|
+
file_path: FilePathAnnotation.FilePath;
|
|
111
|
+
start_index: number;
|
|
112
|
+
/**
|
|
113
|
+
* The text in the message content that needs to be replaced.
|
|
114
|
+
*/
|
|
115
|
+
text: string;
|
|
116
|
+
/**
|
|
117
|
+
* Always `file_path`.
|
|
118
|
+
*/
|
|
119
|
+
type: 'file_path';
|
|
120
|
+
}
|
|
121
|
+
export declare namespace FilePathAnnotation {
|
|
122
|
+
interface FilePath {
|
|
67
123
|
/**
|
|
68
|
-
*
|
|
69
|
-
* File associated with the assistant or the message. Generated when the assistant
|
|
70
|
-
* uses the "retrieval" tool to search files.
|
|
124
|
+
* The ID of the file that was generated.
|
|
71
125
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
126
|
+
file_id: string;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A URL for the file that's generated when the assistant used the
|
|
131
|
+
* `code_interpreter` tool to generate a file.
|
|
132
|
+
*/
|
|
133
|
+
export interface FilePathDeltaAnnotation {
|
|
134
|
+
/**
|
|
135
|
+
* The index of the annotation in the text content part.
|
|
136
|
+
*/
|
|
137
|
+
index: number;
|
|
138
|
+
/**
|
|
139
|
+
* Always `file_path`.
|
|
140
|
+
*/
|
|
141
|
+
type: 'file_path';
|
|
142
|
+
end_index?: number;
|
|
143
|
+
file_path?: FilePathDeltaAnnotation.FilePath;
|
|
144
|
+
start_index?: number;
|
|
145
|
+
/**
|
|
146
|
+
* The text in the message content that needs to be replaced.
|
|
147
|
+
*/
|
|
148
|
+
text?: string;
|
|
149
|
+
}
|
|
150
|
+
export declare namespace FilePathDeltaAnnotation {
|
|
151
|
+
interface FilePath {
|
|
97
152
|
/**
|
|
98
|
-
*
|
|
99
|
-
* `code_interpreter` tool to generate a file.
|
|
153
|
+
* The ID of the file that was generated.
|
|
100
154
|
*/
|
|
101
|
-
|
|
102
|
-
end_index: number;
|
|
103
|
-
file_path: FilePath.FilePath;
|
|
104
|
-
start_index: number;
|
|
105
|
-
/**
|
|
106
|
-
* The text in the message content that needs to be replaced.
|
|
107
|
-
*/
|
|
108
|
-
text: string;
|
|
109
|
-
/**
|
|
110
|
-
* Always `file_path`.
|
|
111
|
-
*/
|
|
112
|
-
type: 'file_path';
|
|
113
|
-
}
|
|
114
|
-
namespace FilePath {
|
|
115
|
-
interface FilePath {
|
|
116
|
-
/**
|
|
117
|
-
* The ID of the file that was generated.
|
|
118
|
-
*/
|
|
119
|
-
file_id: string;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
155
|
+
file_id?: string;
|
|
122
156
|
}
|
|
123
157
|
}
|
|
158
|
+
export interface ImageFile {
|
|
159
|
+
/**
|
|
160
|
+
* The [File](https://platform.openai.com/docs/api-reference/files) ID of the image
|
|
161
|
+
* in the message content.
|
|
162
|
+
*/
|
|
163
|
+
file_id: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* References an image [File](https://platform.openai.com/docs/api-reference/files)
|
|
167
|
+
* in the content of a message.
|
|
168
|
+
*/
|
|
169
|
+
export interface ImageFileContentBlock {
|
|
170
|
+
image_file: ImageFile;
|
|
171
|
+
/**
|
|
172
|
+
* Always `image_file`.
|
|
173
|
+
*/
|
|
174
|
+
type: 'image_file';
|
|
175
|
+
}
|
|
176
|
+
export interface ImageFileDelta {
|
|
177
|
+
/**
|
|
178
|
+
* The [File](https://platform.openai.com/docs/api-reference/files) ID of the image
|
|
179
|
+
* in the message content.
|
|
180
|
+
*/
|
|
181
|
+
file_id?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* References an image [File](https://platform.openai.com/docs/api-reference/files)
|
|
185
|
+
* in the content of a message.
|
|
186
|
+
*/
|
|
187
|
+
export interface ImageFileDeltaBlock {
|
|
188
|
+
/**
|
|
189
|
+
* The index of the content part in the message.
|
|
190
|
+
*/
|
|
191
|
+
index: number;
|
|
192
|
+
/**
|
|
193
|
+
* Always `image_file`.
|
|
194
|
+
*/
|
|
195
|
+
type: 'image_file';
|
|
196
|
+
image_file?: ImageFileDelta;
|
|
197
|
+
}
|
|
124
198
|
/**
|
|
125
199
|
* Represents a message within a
|
|
126
200
|
* [thread](https://platform.openai.com/docs/api-reference/threads).
|
|
127
201
|
*/
|
|
128
|
-
export interface
|
|
202
|
+
export interface Message {
|
|
129
203
|
/**
|
|
130
204
|
* The identifier, which can be referenced in API endpoints.
|
|
131
205
|
*/
|
|
@@ -136,10 +210,14 @@ export interface ThreadMessage {
|
|
|
136
210
|
* authored this message.
|
|
137
211
|
*/
|
|
138
212
|
assistant_id: string | null;
|
|
213
|
+
/**
|
|
214
|
+
* The Unix timestamp (in seconds) for when the message was completed.
|
|
215
|
+
*/
|
|
216
|
+
completed_at: number | null;
|
|
139
217
|
/**
|
|
140
218
|
* The content of the message in array of text and/or images.
|
|
141
219
|
*/
|
|
142
|
-
content: Array<
|
|
220
|
+
content: Array<MessageContent>;
|
|
143
221
|
/**
|
|
144
222
|
* The Unix timestamp (in seconds) for when the message was created.
|
|
145
223
|
*/
|
|
@@ -150,6 +228,14 @@ export interface ThreadMessage {
|
|
|
150
228
|
* that can access files. A maximum of 10 files can be attached to a message.
|
|
151
229
|
*/
|
|
152
230
|
file_ids: Array<string>;
|
|
231
|
+
/**
|
|
232
|
+
* The Unix timestamp (in seconds) for when the message was marked as incomplete.
|
|
233
|
+
*/
|
|
234
|
+
incomplete_at: number | null;
|
|
235
|
+
/**
|
|
236
|
+
* On an incomplete message, details about why the message is incomplete.
|
|
237
|
+
*/
|
|
238
|
+
incomplete_details: Message.IncompleteDetails | null;
|
|
153
239
|
/**
|
|
154
240
|
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
155
241
|
* for storing additional information about the object in a structured format. Keys
|
|
@@ -171,17 +257,118 @@ export interface ThreadMessage {
|
|
|
171
257
|
* authoring of this message.
|
|
172
258
|
*/
|
|
173
259
|
run_id: string | null;
|
|
260
|
+
/**
|
|
261
|
+
* The status of the message, which can be either `in_progress`, `incomplete`, or
|
|
262
|
+
* `completed`.
|
|
263
|
+
*/
|
|
264
|
+
status: 'in_progress' | 'incomplete' | 'completed';
|
|
174
265
|
/**
|
|
175
266
|
* The [thread](https://platform.openai.com/docs/api-reference/threads) ID that
|
|
176
267
|
* this message belongs to.
|
|
177
268
|
*/
|
|
178
269
|
thread_id: string;
|
|
179
270
|
}
|
|
180
|
-
export
|
|
271
|
+
export declare namespace Message {
|
|
272
|
+
/**
|
|
273
|
+
* On an incomplete message, details about why the message is incomplete.
|
|
274
|
+
*/
|
|
275
|
+
interface IncompleteDetails {
|
|
276
|
+
/**
|
|
277
|
+
* The reason the message is incomplete.
|
|
278
|
+
*/
|
|
279
|
+
reason: 'content_filter' | 'max_tokens' | 'run_cancelled' | 'run_expired' | 'run_failed';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* References an image [File](https://platform.openai.com/docs/api-reference/files)
|
|
284
|
+
* in the content of a message.
|
|
285
|
+
*/
|
|
286
|
+
export type MessageContent = ImageFileContentBlock | TextContentBlock;
|
|
287
|
+
/**
|
|
288
|
+
* References an image [File](https://platform.openai.com/docs/api-reference/files)
|
|
289
|
+
* in the content of a message.
|
|
290
|
+
*/
|
|
291
|
+
export type MessageContentDelta = ImageFileDeltaBlock | TextDeltaBlock;
|
|
292
|
+
export interface MessageDeleted {
|
|
181
293
|
id: string;
|
|
182
294
|
deleted: boolean;
|
|
183
295
|
object: 'thread.message.deleted';
|
|
184
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* The delta containing the fields that have changed on the Message.
|
|
299
|
+
*/
|
|
300
|
+
export interface MessageDelta {
|
|
301
|
+
/**
|
|
302
|
+
* The content of the message in array of text and/or images.
|
|
303
|
+
*/
|
|
304
|
+
content?: Array<MessageContentDelta>;
|
|
305
|
+
/**
|
|
306
|
+
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs that
|
|
307
|
+
* the assistant should use. Useful for tools like retrieval and code_interpreter
|
|
308
|
+
* that can access files. A maximum of 10 files can be attached to a message.
|
|
309
|
+
*/
|
|
310
|
+
file_ids?: Array<string>;
|
|
311
|
+
/**
|
|
312
|
+
* The entity that produced the message. One of `user` or `assistant`.
|
|
313
|
+
*/
|
|
314
|
+
role?: 'user' | 'assistant';
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Represents a message delta i.e. any changed fields on a message during
|
|
318
|
+
* streaming.
|
|
319
|
+
*/
|
|
320
|
+
export interface MessageDeltaEvent {
|
|
321
|
+
/**
|
|
322
|
+
* The identifier of the message, which can be referenced in API endpoints.
|
|
323
|
+
*/
|
|
324
|
+
id: string;
|
|
325
|
+
/**
|
|
326
|
+
* The delta containing the fields that have changed on the Message.
|
|
327
|
+
*/
|
|
328
|
+
delta: MessageDelta;
|
|
329
|
+
/**
|
|
330
|
+
* The object type, which is always `thread.message.delta`.
|
|
331
|
+
*/
|
|
332
|
+
object: 'thread.message.delta';
|
|
333
|
+
}
|
|
334
|
+
export interface Text {
|
|
335
|
+
annotations: Array<Annotation>;
|
|
336
|
+
/**
|
|
337
|
+
* The data that makes up the text.
|
|
338
|
+
*/
|
|
339
|
+
value: string;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* The text content that is part of a message.
|
|
343
|
+
*/
|
|
344
|
+
export interface TextContentBlock {
|
|
345
|
+
text: Text;
|
|
346
|
+
/**
|
|
347
|
+
* Always `text`.
|
|
348
|
+
*/
|
|
349
|
+
type: 'text';
|
|
350
|
+
}
|
|
351
|
+
export interface TextDelta {
|
|
352
|
+
annotations?: Array<AnnotationDelta>;
|
|
353
|
+
/**
|
|
354
|
+
* The data that makes up the text.
|
|
355
|
+
*/
|
|
356
|
+
value?: string;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* The text content that is part of a message.
|
|
360
|
+
*/
|
|
361
|
+
export interface TextDeltaBlock {
|
|
362
|
+
/**
|
|
363
|
+
* The index of the content part in the message.
|
|
364
|
+
*/
|
|
365
|
+
index: number;
|
|
366
|
+
/**
|
|
367
|
+
* Always `text`.
|
|
368
|
+
*/
|
|
369
|
+
type: 'text';
|
|
370
|
+
text?: TextDelta;
|
|
371
|
+
}
|
|
185
372
|
export interface MessageCreateParams {
|
|
186
373
|
/**
|
|
187
374
|
* The content of the message.
|
|
@@ -231,11 +418,27 @@ export interface MessageListParams extends CursorPageParams {
|
|
|
231
418
|
order?: 'asc' | 'desc';
|
|
232
419
|
}
|
|
233
420
|
export declare namespace Messages {
|
|
234
|
-
export import
|
|
235
|
-
export import
|
|
236
|
-
export import
|
|
237
|
-
export import
|
|
238
|
-
export import
|
|
421
|
+
export import Annotation = MessagesAPI.Annotation;
|
|
422
|
+
export import AnnotationDelta = MessagesAPI.AnnotationDelta;
|
|
423
|
+
export import FileCitationAnnotation = MessagesAPI.FileCitationAnnotation;
|
|
424
|
+
export import FileCitationDeltaAnnotation = MessagesAPI.FileCitationDeltaAnnotation;
|
|
425
|
+
export import FilePathAnnotation = MessagesAPI.FilePathAnnotation;
|
|
426
|
+
export import FilePathDeltaAnnotation = MessagesAPI.FilePathDeltaAnnotation;
|
|
427
|
+
export import ImageFile = MessagesAPI.ImageFile;
|
|
428
|
+
export import ImageFileContentBlock = MessagesAPI.ImageFileContentBlock;
|
|
429
|
+
export import ImageFileDelta = MessagesAPI.ImageFileDelta;
|
|
430
|
+
export import ImageFileDeltaBlock = MessagesAPI.ImageFileDeltaBlock;
|
|
431
|
+
export import Message = MessagesAPI.Message;
|
|
432
|
+
export import MessageContent = MessagesAPI.MessageContent;
|
|
433
|
+
export import MessageContentDelta = MessagesAPI.MessageContentDelta;
|
|
434
|
+
export import MessageDeleted = MessagesAPI.MessageDeleted;
|
|
435
|
+
export import MessageDelta = MessagesAPI.MessageDelta;
|
|
436
|
+
export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent;
|
|
437
|
+
export import Text = MessagesAPI.Text;
|
|
438
|
+
export import TextContentBlock = MessagesAPI.TextContentBlock;
|
|
439
|
+
export import TextDelta = MessagesAPI.TextDelta;
|
|
440
|
+
export import TextDeltaBlock = MessagesAPI.TextDeltaBlock;
|
|
441
|
+
export import MessagesPage = MessagesAPI.MessagesPage;
|
|
239
442
|
export import MessageCreateParams = MessagesAPI.MessageCreateParams;
|
|
240
443
|
export import MessageUpdateParams = MessagesAPI.MessageUpdateParams;
|
|
241
444
|
export import MessageListParams = MessagesAPI.MessageListParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/threads/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,WAAW,MAAM,iDAAiD,CAAC;AAC/E,OAAO,KAAK,QAAQ,MAAM,8CAA8C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,C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IACtC,MAAM,QAAQ,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;IAC9D,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;IAChD,MAAM,QAAQ,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAC1D,MAAM,QAAQ,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACtD,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC;IAChE,MAAM,QAAQ,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IACrC,MAAM,QAAQ,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;IACjD,MAAM,QAAQ,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;IAC3D,MAAM,QAAQ,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;CACxD"}
|
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
27
|
+
exports.MessagesPage = exports.Messages = void 0;
|
|
28
28
|
const resource_1 = require("openai/resource");
|
|
29
29
|
const core_1 = require("openai/core");
|
|
30
30
|
const MessagesAPI = __importStar(require("openai/resources/beta/threads/messages/messages"));
|
|
@@ -68,7 +68,7 @@ class Messages extends resource_1.APIResource {
|
|
|
68
68
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
69
69
|
return this.list(threadId, {}, query);
|
|
70
70
|
}
|
|
71
|
-
return this._client.getAPIList(`/threads/${threadId}/messages`,
|
|
71
|
+
return this._client.getAPIList(`/threads/${threadId}/messages`, MessagesPage, {
|
|
72
72
|
query,
|
|
73
73
|
...options,
|
|
74
74
|
headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers },
|
|
@@ -76,11 +76,11 @@ class Messages extends resource_1.APIResource {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
exports.Messages = Messages;
|
|
79
|
-
class
|
|
79
|
+
class MessagesPage extends pagination_1.CursorPage {
|
|
80
80
|
}
|
|
81
|
-
exports.
|
|
81
|
+
exports.MessagesPage = MessagesPage;
|
|
82
82
|
(function (Messages) {
|
|
83
|
-
Messages.
|
|
83
|
+
Messages.MessagesPage = MessagesAPI.MessagesPage;
|
|
84
84
|
Messages.Files = FilesAPI.Files;
|
|
85
85
|
Messages.MessageFilesPage = FilesAPI.MessageFilesPage;
|
|
86
86
|
})(Messages = exports.Messages || (exports.Messages = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/resources/beta/threads/messages/messages.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,8CAA8C;AAC9C,sCAA+C;AAC/C,6FAA+E;AAC/E,uFAAyE;AACzE,kDAAsE;AAEtE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/resources/beta/threads/messages/messages.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,8CAA8C;AAC9C,sCAA+C;AAC/C,6FAA+E;AAC/E,uFAAyE;AACzE,kDAAsE;AAEtE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkE3D,CAAC;IAhEC;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,IAAyB,EACzB,OAA6B;QAE7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Q,uBAAmB;CAAG;AAAxD,oCAAwD;AAydxD,WAAiB,QAAQ;IAqBT,qBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAIxC,cAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEvB,yBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;AAE7D,CAAC,EA7BgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6BxB"}
|
|
@@ -42,17 +42,17 @@ export class Messages extends APIResource {
|
|
|
42
42
|
if (isRequestOptions(query)) {
|
|
43
43
|
return this.list(threadId, {}, query);
|
|
44
44
|
}
|
|
45
|
-
return this._client.getAPIList(`/threads/${threadId}/messages`,
|
|
45
|
+
return this._client.getAPIList(`/threads/${threadId}/messages`, MessagesPage, {
|
|
46
46
|
query,
|
|
47
47
|
...options,
|
|
48
48
|
headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers },
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
export class
|
|
52
|
+
export class MessagesPage extends CursorPage {
|
|
53
53
|
}
|
|
54
54
|
(function (Messages) {
|
|
55
|
-
Messages.
|
|
55
|
+
Messages.MessagesPage = MessagesAPI.MessagesPage;
|
|
56
56
|
Messages.Files = FilesAPI.Files;
|
|
57
57
|
Messages.MessageFilesPage = FilesAPI.MessageFilesPage;
|
|
58
58
|
})(Messages || (Messages = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/threads/messages/messages.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,gBAAgB,EAAE,MAAM,aAAa;OACvC,KAAK,WAAW,MAAM,iDAAiD;OACvE,KAAK,QAAQ,MAAM,8CAA8C;OACjE,EAAE,UAAU,EAAyB,MAAM,mBAAmB;AAErE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAA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AAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAWD,IAAI,CACF,QAAgB,EAChB,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACvC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,QAAQ,WAAW,EAAE,YAAY,EAAE;YAC5E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,UAAmB;CAAG;AAydxD,WAAiB,QAAQ;IAqBT,qBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAIxC,cAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEvB,yBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;AAE7D,CAAC,EA7BgB,QAAQ,KAAR,QAAQ,QA6BxB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { RequiredActionFunctionToolCall, Run, RunStatus, RunCreateParams, RunUpdateParams, RunListParams, RunSubmitToolOutputsParams, RunsPage, Runs, } from "./runs.js";
|
|
1
|
+
export { CodeInterpreterLogs, CodeInterpreterOutputImage, CodeInterpreterToolCall, CodeInterpreterToolCallDelta, FunctionToolCall, FunctionToolCallDelta, MessageCreationStepDetails, RetrievalToolCall, RetrievalToolCallDelta, RunStep, RunStepDelta, RunStepDeltaEvent, RunStepDeltaMessageDelta, ToolCall, ToolCallDelta, ToolCallDeltaObject, ToolCallsStepDetails, StepListParams, RunStepsPage, Steps, } from "./steps.js";
|
|
2
|
+
export { RequiredActionFunctionToolCall, Run, RunStatus, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunUpdateParams, RunListParams, RunCreateAndStreamParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsStreamParams, RunsPage, Runs, } from "./runs.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,KAAK,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,8BAA8B,EAC9B,GAAG,EACH,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,sCAAsC,EACtC,mCAAmC,EACnC,gCAAgC,EAChC,QAAQ,EACR,IAAI,GACL,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,oCAqBiB;AAFf,qGAAA,YAAY,OAAA;AACZ,8FAAA,KAAK,OAAA;AAEP,kCAgBgB;AAFd,gGAAA,QAAQ,OAAA;AACR,4FAAA,IAAI,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAE9C,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/threads/runs/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAE9C,EAmBL,YAAY,EACZ,KAAK,GACN;OACM,EAcL,QAAQ,EACR,IAAI,GACL"}
|