@inductiv/node-red-openai-api 0.3.8 → 0.3.9
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/README.md +7 -0
- package/node.html +2544 -552
- package/package.json +1 -1
package/node.html
CHANGED
|
@@ -1,779 +1,2771 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
RED.nodes.registerType("OpenAI API", {
|
|
3
|
+
category: "AI",
|
|
4
|
+
color: "#B8B1FB",
|
|
5
|
+
defaults: {
|
|
6
|
+
name: { value: "" },
|
|
7
|
+
service: { value: "", type: "Service Host", required: true },
|
|
8
|
+
method: { value: "", required: true },
|
|
9
|
+
},
|
|
10
|
+
inputs: 1,
|
|
11
|
+
outputs: 1,
|
|
12
|
+
icon: "icon.png",
|
|
13
|
+
label: function () {
|
|
14
|
+
return this.name || this.method || "OpenAI API";
|
|
15
|
+
},
|
|
16
|
+
labelStyle: function () {
|
|
17
|
+
return this.name ? "node_label_italic" : "";
|
|
18
|
+
},
|
|
19
|
+
oneditprepare: function () {
|
|
20
|
+
var selectedMethod = $("#node-input-method option:selected");
|
|
21
|
+
if (!selectedMethod.val()) {
|
|
22
|
+
var methods = $("#node-input-method").children();
|
|
23
|
+
var firstMethod = methods.first();
|
|
24
|
+
$("#node-input-method").val(firstMethod.val());
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<script type="text/html" data-template-name="OpenAI API">
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
31
|
+
<div class="form-row">
|
|
32
|
+
<label for="node-input-name"
|
|
33
|
+
><i class="fa fa-tag"></i>
|
|
34
|
+
<span data-i18n="node-red:common.label.name"></span
|
|
35
|
+
></label>
|
|
36
|
+
<input
|
|
37
|
+
type="text"
|
|
38
|
+
id="node-input-name"
|
|
39
|
+
data-i18n="[placeholder]node-red:common.label.name"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
<hr />
|
|
43
|
+
|
|
44
|
+
<div class="form-row">
|
|
45
|
+
<label for="node-input-service"
|
|
46
|
+
><i class="fa fa-cloud"></i>
|
|
47
|
+
<span data-i18n="OpenaiApi.label.serviceHost"></span
|
|
48
|
+
></label>
|
|
49
|
+
<input type="text" id="node-input-service" />
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="form-row">
|
|
53
|
+
<label for="node-input-method"
|
|
54
|
+
><i class="fa fa-tasks"></i>
|
|
55
|
+
<span data-i18n="OpenaiApi.label.method"></span
|
|
56
|
+
></label>
|
|
57
|
+
<select id="node-input-method">
|
|
58
|
+
<optgroup style="font-style: normal;" label="🤖 Assistants (Beta)">
|
|
59
|
+
<option
|
|
60
|
+
value="createAssistant"
|
|
61
|
+
data-i18n="OpenaiApi.parameters.createAssistant"
|
|
62
|
+
></option>
|
|
63
|
+
<option
|
|
64
|
+
value="getAssistant"
|
|
65
|
+
data-i18n="OpenaiApi.parameters.getAssistant"
|
|
66
|
+
></option>
|
|
67
|
+
<option
|
|
68
|
+
value="modifyAssistant"
|
|
69
|
+
data-i18n="OpenaiApi.parameters.modifyAssistant"
|
|
70
|
+
></option>
|
|
71
|
+
<option
|
|
72
|
+
value="deleteAssistant"
|
|
73
|
+
data-i18n="OpenaiApi.parameters.deleteAssistant"
|
|
74
|
+
></option>
|
|
75
|
+
<option
|
|
76
|
+
value="listAssistants"
|
|
77
|
+
data-i18n="OpenaiApi.parameters.listAssistants"
|
|
78
|
+
></option>
|
|
79
|
+
<option
|
|
80
|
+
value="listAssistantFiles"
|
|
81
|
+
data-i18n="OpenaiApi.parameters.listAssistantFiles"
|
|
82
|
+
></option>
|
|
83
|
+
<option
|
|
84
|
+
value="createAssistantFile"
|
|
85
|
+
data-i18n="OpenaiApi.parameters.createAssistantFile"
|
|
86
|
+
></option>
|
|
87
|
+
<option
|
|
88
|
+
value="getAssistantFile"
|
|
89
|
+
data-i18n="OpenaiApi.parameters.getAssistantFile"
|
|
90
|
+
></option>
|
|
91
|
+
<option
|
|
92
|
+
value="deleteAssistantFile"
|
|
93
|
+
data-i18n="OpenaiApi.parameters.deleteAssistantFile"
|
|
94
|
+
></option>
|
|
95
|
+
</optgroup>
|
|
96
|
+
<optgroup style="font-style: normal;" label="🔉 Audio">
|
|
97
|
+
<option
|
|
98
|
+
value="createSpeech"
|
|
99
|
+
data-i18n="OpenaiApi.parameters.createSpeech"
|
|
100
|
+
></option>
|
|
101
|
+
<option
|
|
102
|
+
value="createTranscription"
|
|
103
|
+
data-i18n="OpenaiApi.parameters.createTranscription"
|
|
104
|
+
></option>
|
|
105
|
+
<option
|
|
106
|
+
value="createTranslation"
|
|
107
|
+
data-i18n="OpenaiApi.parameters.createTranslation"
|
|
108
|
+
></option>
|
|
109
|
+
</optgroup>
|
|
110
|
+
<optgroup style="font-style: normal;" label="🗨️ Chat">
|
|
111
|
+
<option
|
|
112
|
+
value="createChatCompletion"
|
|
113
|
+
data-i18n="OpenaiApi.parameters.createChatCompletion"
|
|
114
|
+
></option>
|
|
115
|
+
</optgroup>
|
|
116
|
+
<optgroup style="font-style: normal;" label="🔗 Embeddings">
|
|
117
|
+
<option
|
|
118
|
+
value="createEmbedding"
|
|
119
|
+
data-i18n="OpenaiApi.parameters.createEmbedding"
|
|
120
|
+
></option>
|
|
121
|
+
</optgroup>
|
|
122
|
+
<optgroup style="font-style: normal;" label="🔧 Fine-tuning">
|
|
123
|
+
<option
|
|
124
|
+
value="createFineTuningJob"
|
|
125
|
+
data-i18n="OpenaiApi.parameters.createFineTuningJob"
|
|
126
|
+
></option>
|
|
127
|
+
<option
|
|
128
|
+
value="listPaginatedFineTuningJobs"
|
|
129
|
+
data-i18n="OpenaiApi.parameters.listPaginatedFineTuningJobs"
|
|
130
|
+
></option>
|
|
131
|
+
<option
|
|
132
|
+
value="retrieveFineTuningJob"
|
|
133
|
+
data-i18n="OpenaiApi.parameters.retrieveFineTuningJob"
|
|
134
|
+
></option>
|
|
135
|
+
<option
|
|
136
|
+
value="listFineTuningEvents"
|
|
137
|
+
data-i18n="OpenaiApi.parameters.listFineTuningEvents"
|
|
138
|
+
></option>
|
|
139
|
+
<option
|
|
140
|
+
value="cancelFineTuningJob"
|
|
141
|
+
data-i18n="OpenaiApi.parameters.cancelFineTuningJob"
|
|
142
|
+
></option>
|
|
143
|
+
</optgroup>
|
|
144
|
+
<optgroup style="font-style: normal;" label="📁 Files">
|
|
145
|
+
<option
|
|
146
|
+
value="listFiles"
|
|
147
|
+
data-i18n="OpenaiApi.parameters.listFiles"
|
|
148
|
+
></option>
|
|
149
|
+
<option
|
|
150
|
+
value="createFile"
|
|
151
|
+
data-i18n="OpenaiApi.parameters.createFile"
|
|
152
|
+
></option>
|
|
153
|
+
<option
|
|
154
|
+
value="deleteFile"
|
|
155
|
+
data-i18n="OpenaiApi.parameters.deleteFile"
|
|
156
|
+
></option>
|
|
157
|
+
<option
|
|
158
|
+
value="retrieveFile"
|
|
159
|
+
data-i18n="OpenaiApi.parameters.retrieveFile"
|
|
160
|
+
></option>
|
|
161
|
+
<option
|
|
162
|
+
value="downloadFile"
|
|
163
|
+
data-i18n="OpenaiApi.parameters.downloadFile"
|
|
164
|
+
></option>
|
|
165
|
+
</optgroup>
|
|
166
|
+
<optgroup style="font-style: normal;" label="🖼️ Images">
|
|
167
|
+
<option
|
|
168
|
+
value="createImage"
|
|
169
|
+
data-i18n="OpenaiApi.parameters.createImage"
|
|
170
|
+
></option>
|
|
171
|
+
<option
|
|
172
|
+
value="createImageEdit"
|
|
173
|
+
data-i18n="OpenaiApi.parameters.createImageEdit"
|
|
174
|
+
></option>
|
|
175
|
+
<option
|
|
176
|
+
value="createImageVariation"
|
|
177
|
+
data-i18n="OpenaiApi.parameters.createImageVariation"
|
|
178
|
+
></option>
|
|
179
|
+
</optgroup>
|
|
180
|
+
<optgroup style="font-style: normal;" label="📟 Messages (Beta)">
|
|
181
|
+
<option
|
|
182
|
+
value="listMessages"
|
|
183
|
+
data-i18n="OpenaiApi.parameters.listMessages"
|
|
184
|
+
></option>
|
|
185
|
+
<option
|
|
186
|
+
value="createMessage"
|
|
187
|
+
data-i18n="OpenaiApi.parameters.createMessage"
|
|
188
|
+
></option>
|
|
189
|
+
<option
|
|
190
|
+
value="getMessage"
|
|
191
|
+
data-i18n="OpenaiApi.parameters.getMessage"
|
|
192
|
+
></option>
|
|
193
|
+
<option
|
|
194
|
+
value="modifyMessage"
|
|
195
|
+
data-i18n="OpenaiApi.parameters.modifyMessage"
|
|
196
|
+
></option>
|
|
197
|
+
<option
|
|
198
|
+
value="listMessageFiles"
|
|
199
|
+
data-i18n="OpenaiApi.parameters.listMessageFiles"
|
|
200
|
+
></option>
|
|
201
|
+
<option
|
|
202
|
+
value="getMessageFile"
|
|
203
|
+
data-i18n="OpenaiApi.parameters.getMessageFile"
|
|
204
|
+
></option>
|
|
205
|
+
</optgroup>
|
|
206
|
+
<optgroup style="font-style: normal;" label="🧠 Models">
|
|
207
|
+
<option
|
|
208
|
+
value="listModels"
|
|
209
|
+
data-i18n="OpenaiApi.parameters.listModels"
|
|
210
|
+
></option>
|
|
211
|
+
<option
|
|
212
|
+
value="retrieveModel"
|
|
213
|
+
data-i18n="OpenaiApi.parameters.retrieveModel"
|
|
214
|
+
></option>
|
|
215
|
+
<option
|
|
216
|
+
value="deleteModel"
|
|
217
|
+
data-i18n="OpenaiApi.parameters.deleteModel"
|
|
218
|
+
></option>
|
|
219
|
+
</optgroup>
|
|
220
|
+
<optgroup style="font-style: normal;" label="✅ Moderations">
|
|
221
|
+
<option
|
|
222
|
+
value="createModeration"
|
|
223
|
+
data-i18n="OpenaiApi.parameters.createModeration"
|
|
224
|
+
></option>
|
|
225
|
+
</optgroup>
|
|
226
|
+
<optgroup style="font-style: normal;" label="🔄 Runs (Beta)">
|
|
227
|
+
<option
|
|
228
|
+
value="createThreadAndRun"
|
|
229
|
+
data-i18n="OpenaiApi.parameters.createThreadAndRun"
|
|
230
|
+
></option>
|
|
231
|
+
<option
|
|
232
|
+
value="listRuns"
|
|
233
|
+
data-i18n="OpenaiApi.parameters.listRuns"
|
|
234
|
+
></option>
|
|
235
|
+
<option
|
|
236
|
+
value="createRun"
|
|
237
|
+
data-i18n="OpenaiApi.parameters.createRun"
|
|
238
|
+
></option>
|
|
239
|
+
<option value="getRun" data-i18n="OpenaiApi.parameters.getRun"></option>
|
|
240
|
+
<option
|
|
241
|
+
value="modifyRun"
|
|
242
|
+
data-i18n="OpenaiApi.parameters.modifyRun"
|
|
243
|
+
></option>
|
|
244
|
+
<option
|
|
245
|
+
value="submitToolOuputsToRun"
|
|
246
|
+
data-i18n="OpenaiApi.parameters.submitToolOuputsToRun"
|
|
247
|
+
></option>
|
|
248
|
+
<option
|
|
249
|
+
value="cancelRun"
|
|
250
|
+
data-i18n="OpenaiApi.parameters.cancelRun"
|
|
251
|
+
></option>
|
|
252
|
+
<option
|
|
253
|
+
value="listRunSteps"
|
|
254
|
+
data-i18n="OpenaiApi.parameters.listRunSteps"
|
|
255
|
+
></option>
|
|
256
|
+
<option
|
|
257
|
+
value="getRunStep"
|
|
258
|
+
data-i18n="OpenaiApi.parameters.getRunStep"
|
|
259
|
+
></option>
|
|
260
|
+
</optgroup>
|
|
261
|
+
<optgroup style="font-style: normal;" label="🧵 Threads (Beta)">
|
|
262
|
+
<option
|
|
263
|
+
value="createThread"
|
|
264
|
+
data-i18n="OpenaiApi.parameters.createThread"
|
|
265
|
+
></option>
|
|
266
|
+
<option
|
|
267
|
+
value="getThread"
|
|
268
|
+
data-i18n="OpenaiApi.parameters.getThread"
|
|
269
|
+
></option>
|
|
270
|
+
<option
|
|
271
|
+
value="modifyThread"
|
|
272
|
+
data-i18n="OpenaiApi.parameters.modifyThread"
|
|
273
|
+
></option>
|
|
274
|
+
<option
|
|
275
|
+
value="deleteThread"
|
|
276
|
+
data-i18n="OpenaiApi.parameters.deleteThread"
|
|
277
|
+
></option>
|
|
278
|
+
</optgroup>
|
|
279
|
+
</select>
|
|
280
|
+
</div>
|
|
121
281
|
</script>
|
|
122
282
|
|
|
123
283
|
<script type="text/html" data-help-name="OpenAI API">
|
|
124
|
-
|
|
125
|
-
|
|
284
|
+
<p>
|
|
285
|
+
OpenAI Platform Services API. Please see the
|
|
286
|
+
<a href="https://platform.openai.com/docs/api-reference" target="_blank"
|
|
287
|
+
>OpenAI API Reference</a
|
|
288
|
+
>
|
|
289
|
+
for more details.
|
|
290
|
+
</p>
|
|
291
|
+
<p><b>Reference</b></p>
|
|
126
292
|
|
|
127
|
-
|
|
293
|
+
<section>
|
|
128
294
|
<h1 style="font-weight: bold;">🤖 Assistants</h1>
|
|
129
|
-
<a
|
|
295
|
+
<a
|
|
296
|
+
href="https://platform.openai.com/docs/api-reference/assistants"
|
|
297
|
+
target="_blank"
|
|
298
|
+
>Official Documentation
|
|
299
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
300
|
+
></a>
|
|
130
301
|
<h2>Create Assistant</h2>
|
|
131
302
|
<p>Create an assistant with a model and instructions.</p>
|
|
132
303
|
<dl class="message-properties">
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
304
|
+
<h2>msg.payload Properties</h2>
|
|
305
|
+
|
|
306
|
+
<dt>
|
|
307
|
+
model
|
|
308
|
+
<a
|
|
309
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-model"
|
|
310
|
+
target="_blank"
|
|
311
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
312
|
+
></a>
|
|
313
|
+
<span class="property-type">string</span>
|
|
314
|
+
</dt>
|
|
315
|
+
<dd>ID of the model to use.</dd>
|
|
316
|
+
<dt class="optional">
|
|
317
|
+
name
|
|
318
|
+
<a
|
|
319
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-name"
|
|
320
|
+
target="_blank"
|
|
321
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
322
|
+
></a>
|
|
323
|
+
<span class="property-type">string</span>
|
|
324
|
+
</dt>
|
|
325
|
+
<dd>The name of the assistant.</dd>
|
|
326
|
+
<dt class="optional">
|
|
327
|
+
description
|
|
328
|
+
<a
|
|
329
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-description"
|
|
330
|
+
target="_blank"
|
|
331
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
332
|
+
></a>
|
|
333
|
+
<span class="property-type">string</span>
|
|
334
|
+
</dt>
|
|
335
|
+
<dd>The description of the assistant.</dd>
|
|
336
|
+
<dt class="optional">
|
|
337
|
+
instructions
|
|
338
|
+
<a
|
|
339
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-instructions"
|
|
340
|
+
target="_blank"
|
|
341
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
342
|
+
></a>
|
|
343
|
+
<span class="property-type">string</span>
|
|
344
|
+
</dt>
|
|
345
|
+
<dd>The system instructions that the assistant uses.</dd>
|
|
346
|
+
<dt class="optional">
|
|
347
|
+
tools
|
|
348
|
+
<a
|
|
349
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-tools"
|
|
350
|
+
target="_blank"
|
|
351
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
352
|
+
></a>
|
|
353
|
+
<span class="property-type">array</span>
|
|
354
|
+
</dt>
|
|
355
|
+
<dd>A list of tool enabled on the assistant.</dd>
|
|
356
|
+
<dt class="optional">
|
|
357
|
+
file_ids
|
|
358
|
+
<a
|
|
359
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-file_ids"
|
|
360
|
+
target="_blank"
|
|
361
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
362
|
+
></a>
|
|
363
|
+
<span class="property-type">array</span>
|
|
364
|
+
</dt>
|
|
365
|
+
<dd>A list of file IDs attached to this assistant.</dd>
|
|
366
|
+
<dt class="optional">
|
|
367
|
+
metadata
|
|
368
|
+
<a
|
|
369
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-metadata"
|
|
370
|
+
target="_blank"
|
|
371
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
372
|
+
></a>
|
|
373
|
+
<span class="property-type">object</span>
|
|
374
|
+
</dt>
|
|
375
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
142
376
|
</dl>
|
|
143
377
|
|
|
144
378
|
<h2>Retrieve Assistant</h2>
|
|
145
379
|
<p>Retrieves an assistant.</p>
|
|
146
380
|
<dl class="message-properties">
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
381
|
+
<h2>msg.payload Properties</h2>
|
|
382
|
+
|
|
383
|
+
<dt>
|
|
384
|
+
assistant_id
|
|
385
|
+
<a
|
|
386
|
+
href="https://platform.openai.com/docs/api-reference/assistants/getAssistant#assistants-getassistant-assistant_id"
|
|
387
|
+
target="_blank"
|
|
388
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
389
|
+
></a>
|
|
390
|
+
<span class="property-type">string</span>
|
|
391
|
+
</dt>
|
|
392
|
+
<dd>The ID of the assistant to retrieve.</dd>
|
|
150
393
|
</dl>
|
|
151
394
|
|
|
152
395
|
<h2>Modify Assistant</h2>
|
|
153
396
|
<p>Modifies an assistant.</p>
|
|
154
397
|
<dl class="message-properties">
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
<
|
|
165
|
-
|
|
398
|
+
<h2>msg.payload Properties</h2>
|
|
399
|
+
|
|
400
|
+
<dt>
|
|
401
|
+
assistant_id
|
|
402
|
+
<a
|
|
403
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-assistant_id"
|
|
404
|
+
target="_blank"
|
|
405
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
406
|
+
></a>
|
|
407
|
+
<span class="property-type">string</span>
|
|
408
|
+
</dt>
|
|
409
|
+
<dd>The ID of the assistant to modify.</dd>
|
|
410
|
+
<dt class="optional">
|
|
411
|
+
model
|
|
412
|
+
<a
|
|
413
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-model"
|
|
414
|
+
target="_blank"
|
|
415
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
416
|
+
></a>
|
|
417
|
+
<span class="property-type">string</span>
|
|
418
|
+
</dt>
|
|
419
|
+
<dd>ID of the model to use.</dd>
|
|
420
|
+
<dt class="optional">
|
|
421
|
+
name
|
|
422
|
+
<a
|
|
423
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-name"
|
|
424
|
+
target="_blank"
|
|
425
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
426
|
+
></a>
|
|
427
|
+
<span class="property-type">string</span>
|
|
428
|
+
</dt>
|
|
429
|
+
<dd>The name of the assistant.</dd>
|
|
430
|
+
<dt class="optional">
|
|
431
|
+
description
|
|
432
|
+
<a
|
|
433
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-description"
|
|
434
|
+
target="_blank"
|
|
435
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
436
|
+
></a>
|
|
437
|
+
<span class="property-type">string</span>
|
|
438
|
+
</dt>
|
|
439
|
+
<dd>The description of the assistant.</dd>
|
|
440
|
+
<dt class="optional">
|
|
441
|
+
instructions
|
|
442
|
+
<a
|
|
443
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-instructions"
|
|
444
|
+
target="_blank"
|
|
445
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
446
|
+
></a>
|
|
447
|
+
<span class="property-type">string</span>
|
|
448
|
+
</dt>
|
|
449
|
+
<dd>The system instructions that the assistant uses.</dd>
|
|
450
|
+
<dt class="optional">
|
|
451
|
+
tools
|
|
452
|
+
<a
|
|
453
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-tools"
|
|
454
|
+
target="_blank"
|
|
455
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
456
|
+
></a>
|
|
457
|
+
<span class="property-type">array</span>
|
|
458
|
+
</dt>
|
|
459
|
+
<dd>A list of tool enabled on the assistant.</dd>
|
|
460
|
+
<dt class="optional">
|
|
461
|
+
file_ids
|
|
462
|
+
<a
|
|
463
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-file_ids"
|
|
464
|
+
target="_blank"
|
|
465
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
466
|
+
></a>
|
|
467
|
+
<span class="property-type">array</span>
|
|
468
|
+
</dt>
|
|
469
|
+
<dd>A list of File IDs attached to this assistant.</dd>
|
|
470
|
+
<dt class="optional">
|
|
471
|
+
metadata
|
|
472
|
+
<a
|
|
473
|
+
href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-metadata"
|
|
474
|
+
target="_blank"
|
|
475
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
476
|
+
></a>
|
|
477
|
+
<span class="property-type">object</span>
|
|
478
|
+
</dt>
|
|
479
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
166
480
|
</dl>
|
|
167
481
|
|
|
168
482
|
<h2>Delete Assistant</h2>
|
|
169
483
|
<p>Delete an assistant.</p>
|
|
170
484
|
<dl class="message-properties">
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
485
|
+
<h2>msg.payload Properties</h2>
|
|
486
|
+
|
|
487
|
+
<dt>
|
|
488
|
+
assistant_id
|
|
489
|
+
<a
|
|
490
|
+
href="https://platform.openai.com/docs/api-reference/assistants/deleteAssistant#assistants-deleteassistant-assistant_id"
|
|
491
|
+
target="_blank"
|
|
492
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
493
|
+
></a>
|
|
494
|
+
<span class="property-type">string</span>
|
|
495
|
+
</dt>
|
|
496
|
+
<dd>The ID of the assistant to delete.</dd>
|
|
174
497
|
</dl>
|
|
175
498
|
|
|
176
499
|
<h2>List Assistants</h2>
|
|
177
500
|
<p>Returns a list of assistants.</p>
|
|
178
501
|
<dl class="message-properties">
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
<
|
|
183
|
-
|
|
502
|
+
<h2>msg.payload Properties</h2>
|
|
503
|
+
<dt class="optional">
|
|
504
|
+
limit
|
|
505
|
+
<a
|
|
506
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistants#assistants-listassistants-limit"
|
|
507
|
+
target="_blank"
|
|
508
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
509
|
+
></a>
|
|
510
|
+
<span class="property-type">integer</span>
|
|
511
|
+
</dt>
|
|
512
|
+
<dd>A limit on the number of objects to be returned.</dd>
|
|
513
|
+
<dt class="optional">
|
|
514
|
+
order
|
|
515
|
+
<a
|
|
516
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistants#assistants-listassistants-order"
|
|
517
|
+
target="_blank"
|
|
518
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
519
|
+
></a>
|
|
520
|
+
<span class="property-type">string</span>
|
|
521
|
+
</dt>
|
|
522
|
+
<dd>Sort order by the created_at timestamp of the objects.</dd>
|
|
523
|
+
<dt class="optional">
|
|
524
|
+
after
|
|
525
|
+
<a
|
|
526
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistants#assistants-listassistants-after"
|
|
527
|
+
target="_blank"
|
|
528
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
529
|
+
></a>
|
|
530
|
+
<span class="property-type">string</span>
|
|
531
|
+
</dt>
|
|
532
|
+
<dd>A cursor for use in pagination.</dd>
|
|
533
|
+
<dt class="optional">
|
|
534
|
+
before
|
|
535
|
+
<a
|
|
536
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistants#assistants-listassistants-before"
|
|
537
|
+
target="_blank"
|
|
538
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
539
|
+
></a>
|
|
540
|
+
<span class="property-type">string</span>
|
|
541
|
+
</dt>
|
|
542
|
+
<dd>A cursor for use in pagination.</dd>
|
|
184
543
|
</dl>
|
|
185
544
|
|
|
186
545
|
<h2>List Assistant Files</h2>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
546
|
+
<p>Returns a list of assistant files.</p>
|
|
547
|
+
<dl class="message-properties">
|
|
548
|
+
<h2>msg.payload Properties</h2>
|
|
549
|
+
|
|
550
|
+
<dt>
|
|
551
|
+
assistant_id
|
|
552
|
+
<a
|
|
553
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistantFiles#assistants-listassistantfiles-assistant_id"
|
|
554
|
+
target="_blank"
|
|
555
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
556
|
+
></a>
|
|
557
|
+
<span class="property-type">string</span>
|
|
558
|
+
</dt>
|
|
559
|
+
<dd>The ID of the assistant the file belongs to.</dd>
|
|
560
|
+
<dt class="optional">
|
|
561
|
+
limit
|
|
562
|
+
<a
|
|
563
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistantFiles#assistants-listassistantfiles-limit"
|
|
564
|
+
target="_blank"
|
|
565
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
566
|
+
></a>
|
|
567
|
+
<span class="property-type">integer</span>
|
|
568
|
+
</dt>
|
|
569
|
+
<dd>A limit on the number of objects to be returned.</dd>
|
|
570
|
+
<dt class="optional">
|
|
571
|
+
order
|
|
572
|
+
<a
|
|
573
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistantFiles#assistants-listassistantfiles-order"
|
|
574
|
+
target="_blank"
|
|
575
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
576
|
+
></a>
|
|
577
|
+
<span class="property-type">string</span>
|
|
578
|
+
</dt>
|
|
579
|
+
<dd>Sort order by the created_at timestamp of the objects.</dd>
|
|
580
|
+
<dt class="optional">
|
|
581
|
+
after
|
|
582
|
+
<a
|
|
583
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistantFiles#assistants-listassistantfiles-after"
|
|
584
|
+
target="_blank"
|
|
585
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
586
|
+
></a>
|
|
587
|
+
<span class="property-type">string</span>
|
|
588
|
+
</dt>
|
|
589
|
+
<dd>A cursor for use in pagination.</dd>
|
|
590
|
+
<dt class="optional">
|
|
591
|
+
before
|
|
592
|
+
<a
|
|
593
|
+
href="https://platform.openai.com/docs/api-reference/assistants/listAssistantFiles#assistants-listassistantfiles-before"
|
|
594
|
+
target="_blank"
|
|
595
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
596
|
+
></a>
|
|
597
|
+
<span class="property-type">string</span>
|
|
598
|
+
</dt>
|
|
599
|
+
<dd>A cursor for use in pagination.</dd>
|
|
600
|
+
</dl>
|
|
197
601
|
|
|
198
602
|
<h2>Create Assistant File</h2>
|
|
199
603
|
<p>Create an assistant file by attaching a file to an assistant.</p>
|
|
200
604
|
<dl class="message-properties">
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<
|
|
605
|
+
<h2>msg.payload Properties</h2>
|
|
606
|
+
|
|
607
|
+
<dt>
|
|
608
|
+
assistant_id
|
|
609
|
+
<a
|
|
610
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistantFile#assistants-createassistantfile-assistant_id"
|
|
611
|
+
target="_blank"
|
|
612
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
613
|
+
></a>
|
|
614
|
+
<span class="property-type">string</span>
|
|
615
|
+
</dt>
|
|
616
|
+
<dd>The ID of the assistant for which to create a File.</dd>
|
|
617
|
+
<dt>
|
|
618
|
+
file_id
|
|
619
|
+
<a
|
|
620
|
+
href="https://platform.openai.com/docs/api-reference/assistants/createAssistantFile#assistants-createassistantfile-file_id"
|
|
621
|
+
target="_blank"
|
|
622
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
623
|
+
></a>
|
|
624
|
+
<span class="property-type">string</span>
|
|
625
|
+
</dt>
|
|
626
|
+
<dd>
|
|
627
|
+
A File ID (with purpose="assistants") that the assistant should use.
|
|
628
|
+
</dd>
|
|
206
629
|
</dl>
|
|
207
630
|
|
|
208
631
|
<h2>Retrieve Assistant File</h2>
|
|
209
632
|
<p>Retrieves an AssistantFile.</p>
|
|
210
633
|
<dl class="message-properties">
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
634
|
+
<h2>msg.payload Properties</h2>
|
|
635
|
+
|
|
636
|
+
<dt>
|
|
637
|
+
assistant_id
|
|
638
|
+
<a
|
|
639
|
+
href="https://platform.openai.com/docs/api-reference/assistants/getAssistantFile#assistants-getassistantfile-assistant_id"
|
|
640
|
+
target="_blank"
|
|
641
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
642
|
+
></a>
|
|
643
|
+
<span class="property-type">string</span>
|
|
644
|
+
</dt>
|
|
645
|
+
<dd>The ID of the assistant who the file belongs to.</dd>
|
|
646
|
+
<dt>
|
|
647
|
+
file_id
|
|
648
|
+
<a
|
|
649
|
+
href="https://platform.openai.com/docs/api-reference/assistants/getAssistantFile#assistants-getassistantfile-file_id"
|
|
650
|
+
target="_blank"
|
|
651
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
652
|
+
></a>
|
|
653
|
+
<span class="property-type">string</span>
|
|
654
|
+
</dt>
|
|
655
|
+
<dd>The ID of the file we're getting.</dd>
|
|
215
656
|
</dl>
|
|
216
657
|
|
|
217
658
|
<h2>Delete Assistant File</h2>
|
|
218
659
|
<p>Delete an assistant file.</p>
|
|
219
660
|
<dl class="message-properties">
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
661
|
+
<h2>msg.payload Properties</h2>
|
|
662
|
+
|
|
663
|
+
<dt>
|
|
664
|
+
assistant_id
|
|
665
|
+
<a
|
|
666
|
+
href="https://platform.openai.com/docs/api-reference/assistants/deleteAssistantFile#assistants-deleteassistantfile-assistant_id"
|
|
667
|
+
target="_blank"
|
|
668
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
669
|
+
></a>
|
|
670
|
+
<span class="property-type">string</span>
|
|
671
|
+
</dt>
|
|
672
|
+
<dd>The ID of the assistant that the file belongs to.</dd>
|
|
673
|
+
<dt>
|
|
674
|
+
file_id
|
|
675
|
+
<a
|
|
676
|
+
href="https://platform.openai.com/docs/api-reference/assistants/deleteAssistantFile#assistants-deleteassistantfile-file_id"
|
|
677
|
+
target="_blank"
|
|
678
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
679
|
+
></a>
|
|
680
|
+
<span class="property-type">string</span>
|
|
681
|
+
</dt>
|
|
682
|
+
<dd>The ID of the file to delete.</dd>
|
|
224
683
|
</dl>
|
|
225
|
-
|
|
684
|
+
</section>
|
|
226
685
|
|
|
227
|
-
|
|
686
|
+
<section>
|
|
228
687
|
<h1 style="font-weight: bold;">🔉 Audio</h1>
|
|
229
|
-
<a
|
|
688
|
+
<a
|
|
689
|
+
href="https://platform.openai.com/docs/api-reference/audio"
|
|
690
|
+
target="_blank"
|
|
691
|
+
>Official Documentation
|
|
692
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
693
|
+
></a>
|
|
230
694
|
<h2>Create Speech</h2>
|
|
231
695
|
<p>Generates audio from the input text.</p>
|
|
232
696
|
<dl class="message-properties">
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<
|
|
238
|
-
|
|
239
|
-
|
|
697
|
+
<h2>msg.payload Properties</h2>
|
|
698
|
+
|
|
699
|
+
<dt>
|
|
700
|
+
model
|
|
701
|
+
<a
|
|
702
|
+
href="https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-model"
|
|
703
|
+
target="_blank"
|
|
704
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
705
|
+
></a>
|
|
706
|
+
<span class="property-type">string</span>
|
|
707
|
+
</dt>
|
|
708
|
+
<dd>One of the available TTS models: tts-1 or tts-1-hd</dd>
|
|
709
|
+
<dt>
|
|
710
|
+
input
|
|
711
|
+
<a
|
|
712
|
+
href="https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-input"
|
|
713
|
+
target="_blank"
|
|
714
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
715
|
+
></a>
|
|
716
|
+
<span class="property-type">string</span>
|
|
717
|
+
</dt>
|
|
718
|
+
<dd>The text to generate audio for.</dd>
|
|
719
|
+
<dt>
|
|
720
|
+
voice
|
|
721
|
+
<a
|
|
722
|
+
href="https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-voice"
|
|
723
|
+
target="_blank"
|
|
724
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
725
|
+
></a>
|
|
726
|
+
<span class="property-type">string</span>
|
|
727
|
+
</dt>
|
|
728
|
+
<dd>
|
|
729
|
+
The voice to use when generating the audio. Supported voices are alloy,
|
|
730
|
+
echo, fable, onyx, nova, and shimmer.
|
|
731
|
+
</dd>
|
|
732
|
+
<dt class="optional">
|
|
733
|
+
response_format
|
|
734
|
+
<a
|
|
735
|
+
href="https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-response_format"
|
|
736
|
+
target="_blank"
|
|
737
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
738
|
+
></a>
|
|
739
|
+
<span class="property-type">string</span>
|
|
740
|
+
</dt>
|
|
741
|
+
<dd>
|
|
742
|
+
The format to audio in. Supported formats are mp3, opus, aac, and flac.
|
|
743
|
+
</dd>
|
|
744
|
+
<dt class="optional">
|
|
745
|
+
speed
|
|
746
|
+
<a
|
|
747
|
+
href="https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-speed"
|
|
748
|
+
target="_blank"
|
|
749
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
750
|
+
></a>
|
|
751
|
+
<span class="property-type">number</span>
|
|
752
|
+
</dt>
|
|
753
|
+
<dd>
|
|
754
|
+
The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0
|
|
755
|
+
is the default.
|
|
756
|
+
</dd>
|
|
240
757
|
</dl>
|
|
241
758
|
|
|
242
759
|
<h2>Create Transcription</h2>
|
|
243
760
|
<p>Transcribes audio into the input language.</p>
|
|
244
761
|
<dl class="message-properties">
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
762
|
+
<h2>msg.payload Properties</h2>
|
|
763
|
+
|
|
764
|
+
<dt>
|
|
765
|
+
file
|
|
766
|
+
<a
|
|
767
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-file"
|
|
768
|
+
target="_blank"
|
|
769
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
770
|
+
></a>
|
|
771
|
+
<span class="property-type">file</span>
|
|
772
|
+
</dt>
|
|
773
|
+
<dd>
|
|
774
|
+
The audio file object (not file name) to transcribe, in one of these
|
|
775
|
+
formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
776
|
+
</dd>
|
|
777
|
+
<dt>
|
|
778
|
+
model
|
|
779
|
+
<a
|
|
780
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-model"
|
|
781
|
+
target="_blank"
|
|
782
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
783
|
+
></a>
|
|
784
|
+
<span class="property-type">string</span>
|
|
785
|
+
</dt>
|
|
786
|
+
<dd>ID of the model to use.</dd>
|
|
787
|
+
<dt class="optional">
|
|
788
|
+
language
|
|
789
|
+
<a
|
|
790
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-language"
|
|
791
|
+
target="_blank"
|
|
792
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
793
|
+
></a>
|
|
794
|
+
<span class="property-type">string</span>
|
|
795
|
+
</dt>
|
|
796
|
+
<dd>The language of the input audio.</dd>
|
|
797
|
+
<dt class="optional">
|
|
798
|
+
prompt
|
|
799
|
+
<a
|
|
800
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-prompt"
|
|
801
|
+
target="_blank"
|
|
802
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
803
|
+
></a>
|
|
804
|
+
<span class="property-type">string</span>
|
|
805
|
+
</dt>
|
|
806
|
+
<dd>
|
|
807
|
+
An optional text to guide the model's style or continue a previous audio
|
|
808
|
+
segment.
|
|
809
|
+
</dd>
|
|
810
|
+
<dt class="optional">
|
|
811
|
+
response_format
|
|
812
|
+
<a
|
|
813
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-response_format"
|
|
814
|
+
target="_blank"
|
|
815
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
816
|
+
></a>
|
|
817
|
+
<span class="property-type">string</span>
|
|
818
|
+
</dt>
|
|
819
|
+
<dd>
|
|
820
|
+
The format of the transcript output, in one of these options: json,
|
|
821
|
+
text, srt, verbose_json, or vtt.
|
|
822
|
+
</dd>
|
|
823
|
+
<dt class="optional">
|
|
824
|
+
temperature
|
|
825
|
+
<a
|
|
826
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-temperature"
|
|
827
|
+
target="_blank"
|
|
828
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
829
|
+
></a>
|
|
830
|
+
<span class="property-type">number</span>
|
|
831
|
+
</dt>
|
|
832
|
+
<dd>The sampling temperature, between 0 and 1.</dd>
|
|
254
833
|
</dl>
|
|
255
834
|
|
|
256
835
|
<h2>Create Translation</h2>
|
|
257
836
|
<p>Translates audio into English.</p>
|
|
258
837
|
<dl class="message-properties">
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
<
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
838
|
+
<h2>msg.payload Properties</h2>
|
|
839
|
+
|
|
840
|
+
<dt>
|
|
841
|
+
file
|
|
842
|
+
<a
|
|
843
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranslation#audio-createtranslation-file"
|
|
844
|
+
target="_blank"
|
|
845
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
846
|
+
></a>
|
|
847
|
+
<span class="property-type">file</span>
|
|
848
|
+
</dt>
|
|
849
|
+
<dd>
|
|
850
|
+
The audio file object (not file name) translate, in one of these
|
|
851
|
+
formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
852
|
+
</dd>
|
|
853
|
+
<dt>
|
|
854
|
+
model
|
|
855
|
+
<a
|
|
856
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranslation#audio-createtranslation-model"
|
|
857
|
+
target="_blank"
|
|
858
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
859
|
+
></a>
|
|
860
|
+
<span class="property-type"></span>
|
|
861
|
+
</dt>
|
|
862
|
+
<dd>ID of the model to use.</dd>
|
|
863
|
+
<dt class="optional">
|
|
864
|
+
prompt
|
|
865
|
+
<a
|
|
866
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranslation#audio-createtranslation-prompt"
|
|
867
|
+
target="_blank"
|
|
868
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
869
|
+
></a>
|
|
870
|
+
<span class="property-type">string</span>
|
|
871
|
+
</dt>
|
|
872
|
+
<dd>
|
|
873
|
+
An optional text to guide the model's style or continue a previous audio
|
|
874
|
+
segment.
|
|
875
|
+
</dd>
|
|
876
|
+
<dt class="optional">
|
|
877
|
+
response_format
|
|
878
|
+
<a
|
|
879
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranslation#audio-createtranslation-response_format"
|
|
880
|
+
target="_blank"
|
|
881
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
882
|
+
></a>
|
|
883
|
+
<span class="property-type">string</span>
|
|
884
|
+
</dt>
|
|
885
|
+
<dd>
|
|
886
|
+
The format of the transcript output, in one of these options: json,
|
|
887
|
+
text, srt, verbose_json, or vtt.
|
|
888
|
+
</dd>
|
|
889
|
+
<dt class="optional">
|
|
890
|
+
temperature
|
|
891
|
+
<a
|
|
892
|
+
href="https://platform.openai.com/docs/api-reference/audio/createTranslation#audio-createtranslation-temperature"
|
|
893
|
+
target="_blank"
|
|
894
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
895
|
+
></a>
|
|
896
|
+
<span class="property-type">number</span>
|
|
897
|
+
</dt>
|
|
898
|
+
<dd>The sampling temperature, between 0 and 1.</dd>
|
|
267
899
|
</dl>
|
|
268
|
-
|
|
900
|
+
</section>
|
|
269
901
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
<a
|
|
902
|
+
<section>
|
|
903
|
+
<h1 style="font-weight: bold;">🗨️ Chat</h1>
|
|
904
|
+
<a
|
|
905
|
+
href="https://platform.openai.com/docs/api-reference/chat"
|
|
906
|
+
target="_blank"
|
|
907
|
+
>Official Documentation
|
|
908
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
909
|
+
></a>
|
|
273
910
|
<h2>Create Chat Completion</h2>
|
|
274
|
-
<p>
|
|
911
|
+
<p>
|
|
912
|
+
Creates a model response for the given chat conversation.
|
|
913
|
+
<a
|
|
914
|
+
href="https://platform.openai.com/docs/api-reference/chat/create"
|
|
915
|
+
target="_blank"
|
|
916
|
+
>Full documentation.</a
|
|
917
|
+
>
|
|
918
|
+
</p>
|
|
275
919
|
<dl class="message-properties">
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
920
|
+
<h2>msg.payload Properties</h2>
|
|
921
|
+
|
|
922
|
+
<dt>
|
|
923
|
+
messages
|
|
924
|
+
<a
|
|
925
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages"
|
|
926
|
+
target="_blank"
|
|
927
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
928
|
+
></a>
|
|
929
|
+
<span class="property-type">array</span>
|
|
930
|
+
</dt>
|
|
931
|
+
<dd>A list of messages comprising the conversation so far.</dd>
|
|
932
|
+
<dt>
|
|
933
|
+
model
|
|
934
|
+
<a
|
|
935
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-model"
|
|
936
|
+
target="_blank"
|
|
937
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
938
|
+
></a>
|
|
939
|
+
<span class="property-type">string</span>
|
|
940
|
+
</dt>
|
|
941
|
+
<dd>ID of the model to use.</dd>
|
|
942
|
+
<dt class="optional">
|
|
943
|
+
frequency_penalty
|
|
944
|
+
<a
|
|
945
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-frequency_penalty"
|
|
946
|
+
target="_blank"
|
|
947
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
948
|
+
></a>
|
|
949
|
+
<span class="property-type">number</span>
|
|
950
|
+
</dt>
|
|
951
|
+
<dd>Number between -2.0 and 2.0.</dd>
|
|
952
|
+
<dt class="optional">
|
|
953
|
+
logit_bias
|
|
954
|
+
<a
|
|
955
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-logit_bias"
|
|
956
|
+
target="_blank"
|
|
957
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
958
|
+
></a>
|
|
959
|
+
<span class="property-type">object</span>
|
|
960
|
+
</dt>
|
|
961
|
+
<dd>
|
|
962
|
+
Modify the likelihood of specified tokens appearing in the completion.
|
|
963
|
+
</dd>
|
|
964
|
+
<dt class="optional">
|
|
965
|
+
logprobs
|
|
966
|
+
<a
|
|
967
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-logprobs"
|
|
968
|
+
target="_blank"
|
|
969
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
970
|
+
></a>
|
|
971
|
+
<span class="property-type">boolean</span>
|
|
972
|
+
</dt>
|
|
973
|
+
<dd>Whether to return log probabilities of the output tokens or not.</dd>
|
|
974
|
+
<dt class="optional">
|
|
975
|
+
top_logprobs
|
|
976
|
+
<a
|
|
977
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-top_logprobs"
|
|
978
|
+
target="_blank"
|
|
979
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
980
|
+
></a>
|
|
981
|
+
<span class="property-type">integer</span>
|
|
982
|
+
</dt>
|
|
983
|
+
<dd>
|
|
984
|
+
An integer between 0 and 5 specifying the number of most likely tokens
|
|
985
|
+
to return at each token position, each with an associated log
|
|
986
|
+
probability.
|
|
987
|
+
</dd>
|
|
988
|
+
<dt class="optional">
|
|
989
|
+
max_tokens
|
|
990
|
+
<a
|
|
991
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens"
|
|
992
|
+
target="_blank"
|
|
993
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
994
|
+
></a>
|
|
995
|
+
<span class="property-type">integer</span>
|
|
996
|
+
</dt>
|
|
997
|
+
<dd>
|
|
998
|
+
The maximum number of tokens that can be generated in the chat
|
|
999
|
+
completion.
|
|
1000
|
+
</dd>
|
|
1001
|
+
<dt class="optional">
|
|
1002
|
+
n
|
|
1003
|
+
<a
|
|
1004
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-n"
|
|
1005
|
+
target="_blank"
|
|
1006
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1007
|
+
></a>
|
|
1008
|
+
<span class="property-type">integer</span>
|
|
1009
|
+
</dt>
|
|
1010
|
+
<dd>
|
|
1011
|
+
How many chat completion choices to generate for each input message.
|
|
1012
|
+
</dd>
|
|
1013
|
+
<dt class="optional">
|
|
1014
|
+
presence_penalty
|
|
1015
|
+
<a
|
|
1016
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-presence_penalty"
|
|
1017
|
+
target="_blank"
|
|
1018
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1019
|
+
></a>
|
|
1020
|
+
<span class="property-type">number</span>
|
|
1021
|
+
</dt>
|
|
1022
|
+
<dd>Number between -2.0 and 2.0.</dd>
|
|
1023
|
+
<dt class="optional">
|
|
1024
|
+
response_format
|
|
1025
|
+
<a
|
|
1026
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format"
|
|
1027
|
+
target="_blank"
|
|
1028
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1029
|
+
></a>
|
|
1030
|
+
<span class="property-type">object</span>
|
|
1031
|
+
</dt>
|
|
1032
|
+
<dd>An object specifying the format that the model must output.</dd>
|
|
1033
|
+
<dt class="optional">
|
|
1034
|
+
seed
|
|
1035
|
+
<a
|
|
1036
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-seed"
|
|
1037
|
+
target="_blank"
|
|
1038
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1039
|
+
></a>
|
|
1040
|
+
<span class="property-type">integer</span>
|
|
1041
|
+
</dt>
|
|
1042
|
+
<dd>
|
|
1043
|
+
This feature is in Beta. If specified, the system will make a best
|
|
1044
|
+
effort to sample deterministically, such that repeated requests with the
|
|
1045
|
+
same seed and parameters should return the same result.
|
|
1046
|
+
</dd>
|
|
1047
|
+
<dt class="optional">
|
|
1048
|
+
stop
|
|
1049
|
+
<a
|
|
1050
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-stop"
|
|
1051
|
+
target="_blank"
|
|
1052
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1053
|
+
></a>
|
|
1054
|
+
<span class="property-type">string | array</span>
|
|
1055
|
+
</dt>
|
|
1056
|
+
<dd>
|
|
1057
|
+
Up to 4 sequences where the API will stop generating further tokens.
|
|
1058
|
+
</dd>
|
|
1059
|
+
<dt class="optional">
|
|
1060
|
+
stream
|
|
1061
|
+
<a
|
|
1062
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream"
|
|
1063
|
+
target="_blank"
|
|
1064
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1065
|
+
></a>
|
|
1066
|
+
<span class="property-type">boolean</span>
|
|
1067
|
+
</dt>
|
|
1068
|
+
<dd>If set, partial message deltas will be sent, like in ChatGPT.</dd>
|
|
1069
|
+
<dt class="optional">
|
|
1070
|
+
temperature
|
|
1071
|
+
<a
|
|
1072
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature"
|
|
1073
|
+
target="_blank"
|
|
1074
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1075
|
+
></a>
|
|
1076
|
+
<span class="property-type">number</span>
|
|
1077
|
+
</dt>
|
|
1078
|
+
<dd>What sampling temperature to use, between 0 and 2.</dd>
|
|
1079
|
+
<dt class="optional">
|
|
1080
|
+
top_p
|
|
1081
|
+
<a
|
|
1082
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-top_p"
|
|
1083
|
+
target="_blank"
|
|
1084
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1085
|
+
></a>
|
|
1086
|
+
<span class="property-type">number</span>
|
|
1087
|
+
</dt>
|
|
1088
|
+
<dd>
|
|
1089
|
+
An alternative to sampling with temperature, called nucleus sampling,
|
|
1090
|
+
where the model considers the results of the tokens with top_p
|
|
1091
|
+
probability mass.
|
|
1092
|
+
</dd>
|
|
1093
|
+
<dt class="optional">
|
|
1094
|
+
tools
|
|
1095
|
+
<a
|
|
1096
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-tools"
|
|
1097
|
+
target="_blank"
|
|
1098
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1099
|
+
></a>
|
|
1100
|
+
<span class="property-type">array</span>
|
|
1101
|
+
</dt>
|
|
1102
|
+
<dd>A list of tools the model may call.</dd>
|
|
1103
|
+
<dt class="optional">
|
|
1104
|
+
tool_choice
|
|
1105
|
+
<a
|
|
1106
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice"
|
|
1107
|
+
target="_blank"
|
|
1108
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1109
|
+
></a>
|
|
1110
|
+
<span class="property-type">string | object</span>
|
|
1111
|
+
</dt>
|
|
1112
|
+
<dd>Controls which (if any) function is called by the model.</dd>
|
|
1113
|
+
<dt class="optional">
|
|
1114
|
+
user
|
|
1115
|
+
<a
|
|
1116
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-user"
|
|
1117
|
+
target="_blank"
|
|
1118
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1119
|
+
></a>
|
|
1120
|
+
<span class="property-type">string</span>
|
|
1121
|
+
</dt>
|
|
1122
|
+
<dd>
|
|
1123
|
+
A unique identifier representing your end-user, which can help OpenAI to
|
|
1124
|
+
monitor and detect abuse.
|
|
1125
|
+
</dd>
|
|
294
1126
|
</dl>
|
|
295
|
-
|
|
1127
|
+
</section>
|
|
296
1128
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
<a
|
|
1129
|
+
<section>
|
|
1130
|
+
<h1 style="font-weight: bold;">🔗 Embeddings</h1>
|
|
1131
|
+
<a
|
|
1132
|
+
href="https://platform.openai.com/docs/api-reference/embeddings"
|
|
1133
|
+
target="_blank"
|
|
1134
|
+
>Official Documentation
|
|
1135
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1136
|
+
></a>
|
|
300
1137
|
<h2>Create Embeddings</h2>
|
|
301
1138
|
<p>Creates an embedding vector representing the input text.</p>
|
|
302
1139
|
<dl class="message-properties">
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
<
|
|
308
|
-
|
|
1140
|
+
<h2>msg.payload Properties</h2>
|
|
1141
|
+
|
|
1142
|
+
<dt>
|
|
1143
|
+
input
|
|
1144
|
+
<a
|
|
1145
|
+
href="https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-input"
|
|
1146
|
+
target="_blank"
|
|
1147
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1148
|
+
></a>
|
|
1149
|
+
<span class="property-type">string | array</span>
|
|
1150
|
+
</dt>
|
|
1151
|
+
<dd>Input text to embed, encoded as a string or array of tokens.</dd>
|
|
1152
|
+
<dt>
|
|
1153
|
+
model
|
|
1154
|
+
<a
|
|
1155
|
+
href="https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-model"
|
|
1156
|
+
target="_blank"
|
|
1157
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1158
|
+
></a>
|
|
1159
|
+
<span class="property-type">string</span>
|
|
1160
|
+
</dt>
|
|
1161
|
+
<dd>ID of the model to use.</dd>
|
|
1162
|
+
<dt class="optional">
|
|
1163
|
+
encoding_format
|
|
1164
|
+
<a
|
|
1165
|
+
href="https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-encoding_format"
|
|
1166
|
+
target="_blank"
|
|
1167
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1168
|
+
></a>
|
|
1169
|
+
<span class="property-type">string</span>
|
|
1170
|
+
</dt>
|
|
1171
|
+
<dd>
|
|
1172
|
+
The format to return the embeddings in. Can be either float or base64.
|
|
1173
|
+
</dd>
|
|
1174
|
+
<dt class="optional">
|
|
1175
|
+
dimensions
|
|
1176
|
+
<a
|
|
1177
|
+
href="https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-dimensions"
|
|
1178
|
+
target="_blank"
|
|
1179
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1180
|
+
></a>
|
|
1181
|
+
<span class="property-type">integer</span>
|
|
1182
|
+
</dt>
|
|
1183
|
+
<dd>
|
|
1184
|
+
The number of dimensions the resulting output embeddings should have.
|
|
1185
|
+
Only supported in text-embedding-3 and later models.
|
|
1186
|
+
</dd>
|
|
1187
|
+
<dt class="optional">
|
|
1188
|
+
user
|
|
1189
|
+
<a
|
|
1190
|
+
href="https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-user"
|
|
1191
|
+
target="_blank"
|
|
1192
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1193
|
+
></a>
|
|
1194
|
+
<span class="property-type">string</span>
|
|
1195
|
+
</dt>
|
|
1196
|
+
<dd>
|
|
1197
|
+
A unique identifier representing your end-user, which can help OpenAI to
|
|
1198
|
+
monitor and detect abuse.
|
|
1199
|
+
</dd>
|
|
309
1200
|
</dl>
|
|
310
|
-
|
|
1201
|
+
</section>
|
|
311
1202
|
|
|
312
|
-
|
|
1203
|
+
<section>
|
|
313
1204
|
<h1 style="font-weight: bold;">🔧 Fine-tuning</h1>
|
|
314
|
-
<a
|
|
1205
|
+
<a
|
|
1206
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning"
|
|
1207
|
+
target="_blank"
|
|
1208
|
+
>Official Documentation
|
|
1209
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1210
|
+
></a>
|
|
315
1211
|
<h2>Create Fine-tuning Job</h2>
|
|
316
|
-
<p>
|
|
1212
|
+
<p>
|
|
1213
|
+
Creates a job that fine-tunes a specified model from a given dataset.
|
|
1214
|
+
Response includes details of the enqueued job including job status and the
|
|
1215
|
+
name of the fine-tuned models once complete.
|
|
1216
|
+
</p>
|
|
317
1217
|
<dl class="message-properties">
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
|
|
1218
|
+
<h2>msg.payload Properties</h2>
|
|
1219
|
+
|
|
1220
|
+
<dt>
|
|
1221
|
+
model
|
|
1222
|
+
<a
|
|
1223
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-model"
|
|
1224
|
+
target="_blank"
|
|
1225
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1226
|
+
></a>
|
|
1227
|
+
<span class="property-type">string</span>
|
|
1228
|
+
</dt>
|
|
1229
|
+
<dd>The name of the model to fine-tune.</dd>
|
|
1230
|
+
<dt>
|
|
1231
|
+
training_file
|
|
1232
|
+
<a
|
|
1233
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-training_file"
|
|
1234
|
+
target="_blank"
|
|
1235
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1236
|
+
></a>
|
|
1237
|
+
<span class="property-type">string</span>
|
|
1238
|
+
</dt>
|
|
1239
|
+
<dd>The ID of an uploaded file that contains training data.</dd>
|
|
1240
|
+
<dt class="optional">
|
|
1241
|
+
hyperparameters
|
|
1242
|
+
<a
|
|
1243
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-hyperparameters"
|
|
1244
|
+
target="_blank"
|
|
1245
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1246
|
+
></a>
|
|
1247
|
+
<span class="property-type">object</span>
|
|
1248
|
+
</dt>
|
|
1249
|
+
<dd>The hyperparameters used for the fine-tuning job.</dd>
|
|
1250
|
+
<dt class="optional">
|
|
1251
|
+
suffix
|
|
1252
|
+
<a
|
|
1253
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-suffix"
|
|
1254
|
+
target="_blank"
|
|
1255
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1256
|
+
></a>
|
|
1257
|
+
<span class="property-type">string</span>
|
|
1258
|
+
</dt>
|
|
1259
|
+
<dd>
|
|
1260
|
+
A string of up to 18 characters that will be added to your fine-tuned
|
|
1261
|
+
model name.
|
|
1262
|
+
</dd>
|
|
1263
|
+
<dt class="optional">
|
|
1264
|
+
validation_file
|
|
1265
|
+
<a
|
|
1266
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-validation_file"
|
|
1267
|
+
target="_blank"
|
|
1268
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1269
|
+
></a>
|
|
1270
|
+
<span class="property-type">string</span>
|
|
1271
|
+
</dt>
|
|
1272
|
+
<dd>The ID of an uploaded file that contains validation data.</dd>
|
|
325
1273
|
</dl>
|
|
326
1274
|
|
|
327
1275
|
<h2>List Fine-tuning Jobs</h2>
|
|
328
1276
|
<p>List your organization's fine-tuning jobs</p>
|
|
329
1277
|
<dl class="message-properties">
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
1278
|
+
<h2>msg.payload Properties</h2>
|
|
1279
|
+
|
|
1280
|
+
<dt class="optional">
|
|
1281
|
+
after
|
|
1282
|
+
<a
|
|
1283
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/list#fine-tuning-list-after"
|
|
1284
|
+
target="_blank"
|
|
1285
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1286
|
+
></a>
|
|
1287
|
+
<span class="property-type">string</span>
|
|
1288
|
+
</dt>
|
|
1289
|
+
<dd>Identifier for the last job from the previous pagination request.</dd>
|
|
1290
|
+
<dt class="optional">
|
|
1291
|
+
limit
|
|
1292
|
+
<a
|
|
1293
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/list#fine-tuning-list-limit"
|
|
1294
|
+
target="_blank"
|
|
1295
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1296
|
+
></a>
|
|
1297
|
+
<span class="property-type">integer</span>
|
|
1298
|
+
</dt>
|
|
1299
|
+
<dd>Number of fine-tuning jobs to retrieve.</dd>
|
|
334
1300
|
</dl>
|
|
335
1301
|
|
|
336
1302
|
<h2>Retrieve Fine-tuning Job</h2>
|
|
337
1303
|
<p>Get info about a fine-tuning job.</p>
|
|
338
1304
|
<dl class="message-properties">
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
1305
|
+
<h2>msg.payload Properties</h2>
|
|
1306
|
+
|
|
1307
|
+
<dt>
|
|
1308
|
+
fine_tuning_job_id
|
|
1309
|
+
<a
|
|
1310
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/retrieve#fine-tuning-retrieve-fine_tuning_job_id"
|
|
1311
|
+
target="_blank"
|
|
1312
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1313
|
+
></a>
|
|
1314
|
+
<span class="property-type">string</span>
|
|
1315
|
+
</dt>
|
|
1316
|
+
<dd>The ID of the fine-tuning job.</dd>
|
|
342
1317
|
</dl>
|
|
343
1318
|
|
|
344
1319
|
<h2>List Fine-tuning Events</h2>
|
|
345
1320
|
<p>Get status updates for a fine-tuning job.</p>
|
|
346
1321
|
<dl class="message-properties">
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
<
|
|
1322
|
+
<h2>msg.payload Properties</h2>
|
|
1323
|
+
|
|
1324
|
+
<dt>
|
|
1325
|
+
fine_tuning_job_id
|
|
1326
|
+
<a
|
|
1327
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/list-events#fine-tuning-list-events-fine_tuning_job_id"
|
|
1328
|
+
target="_blank"
|
|
1329
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1330
|
+
></a>
|
|
1331
|
+
<span class="property-type">string</span>
|
|
1332
|
+
</dt>
|
|
1333
|
+
<dd>The ID of the fine-tuning job to get events for.</dd>
|
|
1334
|
+
<dt class="optional">
|
|
1335
|
+
after
|
|
1336
|
+
<a
|
|
1337
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/list-events#fine-tuning-list-events-after"
|
|
1338
|
+
target="_blank"
|
|
1339
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1340
|
+
></a>
|
|
1341
|
+
<span class="property-type">string</span>
|
|
1342
|
+
</dt>
|
|
1343
|
+
<dd>
|
|
1344
|
+
Identifier for the last event from the previous pagination request.
|
|
1345
|
+
</dd>
|
|
1346
|
+
<dt class="optional">
|
|
1347
|
+
limit
|
|
1348
|
+
<a
|
|
1349
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/list-events#fine-tuning-list-events-limit"
|
|
1350
|
+
target="_blank"
|
|
1351
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1352
|
+
></a>
|
|
1353
|
+
<span class="property-type">integer</span>
|
|
1354
|
+
</dt>
|
|
1355
|
+
<dd>Number of events to retrieve.</dd>
|
|
352
1356
|
</dl>
|
|
353
1357
|
|
|
354
1358
|
<h2>Cancel Fine-tuning Job</h2>
|
|
355
1359
|
<p>Immediately cancel a fine-tune job.</p>
|
|
356
1360
|
<dl class="message-properties">
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
1361
|
+
<h2>msg.payload Properties</h2>
|
|
1362
|
+
|
|
1363
|
+
<dt>
|
|
1364
|
+
fine_tuning_job_id
|
|
1365
|
+
<a
|
|
1366
|
+
href="https://platform.openai.com/docs/api-reference/fine-tuning/cancel#fine-tuning-cancel-fine_tuning_job_id"
|
|
1367
|
+
target="_blank"
|
|
1368
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1369
|
+
></a>
|
|
1370
|
+
<span class="property-type">string</span>
|
|
1371
|
+
</dt>
|
|
1372
|
+
<dd>The ID of the fine-tuning job to cancel.</dd>
|
|
360
1373
|
</dl>
|
|
361
|
-
|
|
1374
|
+
</section>
|
|
362
1375
|
|
|
363
|
-
|
|
1376
|
+
<section>
|
|
364
1377
|
<h1 style="font-weight: bold;">📁 Files</h1>
|
|
365
|
-
<a
|
|
1378
|
+
<a
|
|
1379
|
+
href="https://platform.openai.com/docs/api-reference/files"
|
|
1380
|
+
target="_blank"
|
|
1381
|
+
>Official Documentation
|
|
1382
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1383
|
+
></a>
|
|
366
1384
|
<h2>List Files</h2>
|
|
367
1385
|
<p>Returns a list of files that belong to the user's organization.</p>
|
|
368
1386
|
<dl class="message-properties">
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
1387
|
+
<h2>msg.payload Properties</h2>
|
|
1388
|
+
|
|
1389
|
+
<dt class="optional">
|
|
1390
|
+
purpose
|
|
1391
|
+
<a
|
|
1392
|
+
href="https://platform.openai.com/docs/api-reference/files/list#files-list-purpose"
|
|
1393
|
+
target="_blank"
|
|
1394
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1395
|
+
></a>
|
|
1396
|
+
<span class="property-type">string</span>
|
|
1397
|
+
</dt>
|
|
1398
|
+
<dd>Only return files with the given purpose.</dd>
|
|
372
1399
|
</dl>
|
|
373
1400
|
|
|
374
1401
|
<h2>Upload File</h2>
|
|
375
1402
|
<dl class="message-properties">
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
<
|
|
1403
|
+
<h2>msg.payload Properties</h2>
|
|
1404
|
+
|
|
1405
|
+
<dt>
|
|
1406
|
+
file
|
|
1407
|
+
<a
|
|
1408
|
+
href="https://platform.openai.com/docs/api-reference/files/create#files-create-file"
|
|
1409
|
+
target="_blank"
|
|
1410
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1411
|
+
></a>
|
|
1412
|
+
<span class="property-type">file</span>
|
|
1413
|
+
</dt>
|
|
1414
|
+
<dd>The File object (not file name) to be uploaded.</dd>
|
|
1415
|
+
<dt>
|
|
1416
|
+
purpose
|
|
1417
|
+
<a
|
|
1418
|
+
href="https://platform.openai.com/docs/api-reference/files/create#files-create-purpose"
|
|
1419
|
+
target="_blank"
|
|
1420
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1421
|
+
></a>
|
|
1422
|
+
<span class="property-type">string</span>
|
|
1423
|
+
</dt>
|
|
1424
|
+
<dd>The intended purpose of the uploaded file.</dd>
|
|
381
1425
|
</dl>
|
|
382
1426
|
|
|
383
1427
|
<h2>Delete File</h2>
|
|
384
1428
|
<p>Delete a file.</p>
|
|
385
1429
|
<dl class="message-properties">
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
1430
|
+
<h2>msg.payload Properties</h2>
|
|
1431
|
+
|
|
1432
|
+
<dt>file_id <span class="property-type">string</span></dt>
|
|
1433
|
+
<dd>The ID of the file to use for this request.</dd>
|
|
389
1434
|
</dl>
|
|
390
1435
|
|
|
391
1436
|
<h2>Retrieve File</h2>
|
|
392
1437
|
<p>Returns information about a specific file.</p>
|
|
393
1438
|
<dl class="message-properties">
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
1439
|
+
<h2>msg.payload Properties</h2>
|
|
1440
|
+
|
|
1441
|
+
<dt>
|
|
1442
|
+
file_id
|
|
1443
|
+
<a
|
|
1444
|
+
href="https://platform.openai.com/docs/api-reference/files/delete#files-delete-file_id"
|
|
1445
|
+
target="_blank"
|
|
1446
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1447
|
+
></a>
|
|
1448
|
+
<span class="property-type">string</span>
|
|
1449
|
+
</dt>
|
|
1450
|
+
<dd>The ID of the file to use for this request.</dd>
|
|
397
1451
|
</dl>
|
|
398
1452
|
|
|
399
1453
|
<h2>Retrieve File Content</h2>
|
|
400
1454
|
<p>Returns the contents of the specified file.</p>
|
|
401
1455
|
<dl class="message-properties">
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
1456
|
+
<h2>msg.payload Properties</h2>
|
|
1457
|
+
|
|
1458
|
+
<dt>
|
|
1459
|
+
file_id
|
|
1460
|
+
<a
|
|
1461
|
+
href="https://platform.openai.com/docs/api-reference/files/retrieve-contents#files-retrieve-contents-file_id"
|
|
1462
|
+
target="_blank"
|
|
1463
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1464
|
+
></a>
|
|
1465
|
+
<span class="property-type">string</span>
|
|
1466
|
+
</dt>
|
|
1467
|
+
<dd>The ID of the file to use for this request.</dd>
|
|
405
1468
|
</dl>
|
|
406
|
-
|
|
1469
|
+
</section>
|
|
407
1470
|
|
|
408
|
-
|
|
1471
|
+
<section>
|
|
409
1472
|
<h1 style="font-weight: bold;">🖼️ Images</h1>
|
|
410
|
-
<a
|
|
1473
|
+
<a
|
|
1474
|
+
href="https://platform.openai.com/docs/api-reference/images"
|
|
1475
|
+
target="_blank"
|
|
1476
|
+
>Official Documentation
|
|
1477
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1478
|
+
></a>
|
|
411
1479
|
<h2>Create Image</h2>
|
|
412
1480
|
<p>Creates an image given a prompt.</p>
|
|
413
1481
|
<dl class="message-properties">
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
<
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
<
|
|
1482
|
+
<h2>msg.payload Properties</h2>
|
|
1483
|
+
|
|
1484
|
+
<dt>
|
|
1485
|
+
prompt
|
|
1486
|
+
<a
|
|
1487
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-prompt"
|
|
1488
|
+
target="_blank"
|
|
1489
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1490
|
+
></a>
|
|
1491
|
+
<span class="property-type">string</span>
|
|
1492
|
+
</dt>
|
|
1493
|
+
<dd>A text description of the desired image(s).</dd>
|
|
1494
|
+
<dt class="optional">
|
|
1495
|
+
model
|
|
1496
|
+
<a
|
|
1497
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-model"
|
|
1498
|
+
target="_blank"
|
|
1499
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1500
|
+
></a>
|
|
1501
|
+
<span class="property-type">string</span>
|
|
1502
|
+
</dt>
|
|
1503
|
+
<dd>The model to use for image generation.</dd>
|
|
1504
|
+
<dt class="optional">
|
|
1505
|
+
n
|
|
1506
|
+
<a
|
|
1507
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-n"
|
|
1508
|
+
target="_blank"
|
|
1509
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1510
|
+
></a>
|
|
1511
|
+
<span class="property-type">integer</span>
|
|
1512
|
+
</dt>
|
|
1513
|
+
<dd>The number of images to generate.</dd>
|
|
1514
|
+
<dt class="optional">
|
|
1515
|
+
quality
|
|
1516
|
+
<a
|
|
1517
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-quality"
|
|
1518
|
+
target="_blank"
|
|
1519
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1520
|
+
></a>
|
|
1521
|
+
<span class="property-type">string</span>
|
|
1522
|
+
</dt>
|
|
1523
|
+
<dd>The quality of the image that will be generated.</dd>
|
|
1524
|
+
<dt class="optional">
|
|
1525
|
+
response_format
|
|
1526
|
+
<a
|
|
1527
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-response_format"
|
|
1528
|
+
target="_blank"
|
|
1529
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1530
|
+
></a>
|
|
1531
|
+
<span class="property-type">string</span>
|
|
1532
|
+
</dt>
|
|
1533
|
+
<dd>
|
|
1534
|
+
The format in which the generated images are returned. Must be one of
|
|
1535
|
+
url or b64_json.
|
|
1536
|
+
</dd>
|
|
1537
|
+
<dt class="optional">
|
|
1538
|
+
size
|
|
1539
|
+
<a
|
|
1540
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-size"
|
|
1541
|
+
target="_blank"
|
|
1542
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1543
|
+
></a>
|
|
1544
|
+
<span class="property-type">string</span>
|
|
1545
|
+
</dt>
|
|
1546
|
+
<dd>
|
|
1547
|
+
The size of the generated images. Must be one of 256x256, 512x512, or
|
|
1548
|
+
1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or
|
|
1549
|
+
1024x1792.
|
|
1550
|
+
</dd>
|
|
1551
|
+
<dt class="optional">
|
|
1552
|
+
style
|
|
1553
|
+
<a
|
|
1554
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-style"
|
|
1555
|
+
target="_blank"
|
|
1556
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1557
|
+
></a>
|
|
1558
|
+
<span class="property-type">string</span>
|
|
1559
|
+
</dt>
|
|
1560
|
+
<dd>
|
|
1561
|
+
The style of the generated images. Must be one of vivid or natural.
|
|
1562
|
+
</dd>
|
|
1563
|
+
<dt class="optional">
|
|
1564
|
+
user
|
|
1565
|
+
<a
|
|
1566
|
+
href="https://platform.openai.com/docs/api-reference/images/create#images-create-user"
|
|
1567
|
+
target="_blank"
|
|
1568
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1569
|
+
></a>
|
|
1570
|
+
<span class="property-type">string</span>
|
|
1571
|
+
</dt>
|
|
1572
|
+
<dd>
|
|
1573
|
+
A unique identifier representing your end-user, which can help OpenAI to
|
|
1574
|
+
monitor and detect abuse.
|
|
1575
|
+
</dd>
|
|
424
1576
|
</dl>
|
|
425
1577
|
|
|
426
1578
|
<h2>Create Image Edit</h2>
|
|
427
|
-
<p>
|
|
1579
|
+
<p>
|
|
1580
|
+
Creates an edited or extended image given an original image and a prompt.
|
|
1581
|
+
</p>
|
|
428
1582
|
<dl class="message-properties">
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
<
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
<
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
1583
|
+
<h2>msg.payload Properties</h2>
|
|
1584
|
+
|
|
1585
|
+
<dt>
|
|
1586
|
+
image
|
|
1587
|
+
<a
|
|
1588
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-image"
|
|
1589
|
+
target="_blank"
|
|
1590
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1591
|
+
></a>
|
|
1592
|
+
<span class="property-type">string</span>
|
|
1593
|
+
</dt>
|
|
1594
|
+
<dd>The image to edit.</dd>
|
|
1595
|
+
<dt>
|
|
1596
|
+
prompt
|
|
1597
|
+
<a
|
|
1598
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-prompt"
|
|
1599
|
+
target="_blank"
|
|
1600
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1601
|
+
></a>
|
|
1602
|
+
<span class="property-type">string</span>
|
|
1603
|
+
</dt>
|
|
1604
|
+
<dd>A text description of the desired image(s).</dd>
|
|
1605
|
+
<dt class="optional">
|
|
1606
|
+
mask
|
|
1607
|
+
<a
|
|
1608
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-mask"
|
|
1609
|
+
target="_blank"
|
|
1610
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1611
|
+
></a>
|
|
1612
|
+
<span class="property-type">string</span>
|
|
1613
|
+
</dt>
|
|
1614
|
+
<dd>
|
|
1615
|
+
An additional image whose fully transparent areas (e.g. where alpha is
|
|
1616
|
+
zero) indicate where image should be edited.
|
|
1617
|
+
</dd>
|
|
1618
|
+
<dt class="optional">
|
|
1619
|
+
model
|
|
1620
|
+
<a
|
|
1621
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-model"
|
|
1622
|
+
target="_blank"
|
|
1623
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1624
|
+
></a>
|
|
1625
|
+
<span class="property-type"></span>
|
|
1626
|
+
</dt>
|
|
1627
|
+
<dd>The model to use for image generation.</dd>
|
|
1628
|
+
<dt class="optional">
|
|
1629
|
+
n
|
|
1630
|
+
<a
|
|
1631
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-n"
|
|
1632
|
+
target="_blank"
|
|
1633
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1634
|
+
></a>
|
|
1635
|
+
<span class="property-type">integer</span>
|
|
1636
|
+
</dt>
|
|
1637
|
+
<dd>The number of images to generate. Must be between 1 and 10.</dd>
|
|
1638
|
+
<dt class="optional">
|
|
1639
|
+
size
|
|
1640
|
+
<a
|
|
1641
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-size"
|
|
1642
|
+
target="_blank"
|
|
1643
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1644
|
+
></a>
|
|
1645
|
+
<span class="property-type">string</span>
|
|
1646
|
+
</dt>
|
|
1647
|
+
<dd>The size of the generated images.</dd>
|
|
1648
|
+
<dt class="optional">
|
|
1649
|
+
response_format
|
|
1650
|
+
<a
|
|
1651
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-response_format"
|
|
1652
|
+
target="_blank"
|
|
1653
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1654
|
+
></a>
|
|
1655
|
+
<span class="property-type">string</span>
|
|
1656
|
+
</dt>
|
|
1657
|
+
<dd>
|
|
1658
|
+
The format in which the generated images are returned. Must be one of
|
|
1659
|
+
url or b64_json.
|
|
1660
|
+
</dd>
|
|
1661
|
+
<dt class="optional">
|
|
1662
|
+
user
|
|
1663
|
+
<a
|
|
1664
|
+
href="https://platform.openai.com/docs/api-reference/images/createEdit#images-createedit-user"
|
|
1665
|
+
target="_blank"
|
|
1666
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1667
|
+
></a>
|
|
1668
|
+
<span class="property-type">string</span>
|
|
1669
|
+
</dt>
|
|
1670
|
+
<dd>
|
|
1671
|
+
A unique identifier representing your end-user, which can help OpenAI to
|
|
1672
|
+
monitor and detect abuse.
|
|
1673
|
+
</dd>
|
|
1674
|
+
</dl>
|
|
1675
|
+
|
|
442
1676
|
<h2>Create Image Variation</h2>
|
|
443
1677
|
<p>Creates a variation of a given image.</p>
|
|
444
1678
|
<dl class="message-properties">
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
<
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
1679
|
+
<h2>msg.payload Properties</h2>
|
|
1680
|
+
|
|
1681
|
+
<dt>
|
|
1682
|
+
image
|
|
1683
|
+
<a
|
|
1684
|
+
href="https://platform.openai.com/docs/api-reference/images/createVariation#images-createvariation-image"
|
|
1685
|
+
target="_blank"
|
|
1686
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1687
|
+
></a>
|
|
1688
|
+
<span class="property-type">string</span>
|
|
1689
|
+
</dt>
|
|
1690
|
+
<dd>The image to use as the basis for the variation(s).</dd>
|
|
1691
|
+
<dt>
|
|
1692
|
+
model
|
|
1693
|
+
<a
|
|
1694
|
+
href="https://platform.openai.com/docs/api-reference/images/createVariation#images-createvariation-model"
|
|
1695
|
+
target="_blank"
|
|
1696
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1697
|
+
></a>
|
|
1698
|
+
<span class="property-type"></span>
|
|
1699
|
+
</dt>
|
|
1700
|
+
<dd>The model to use for image generation.</dd>
|
|
1701
|
+
<dt>
|
|
1702
|
+
n
|
|
1703
|
+
<a
|
|
1704
|
+
href="https://platform.openai.com/docs/api-reference/images/createVariation#images-createvariation-n"
|
|
1705
|
+
target="_blank"
|
|
1706
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1707
|
+
></a>
|
|
1708
|
+
<span class="property-type">integer</span>
|
|
1709
|
+
</dt>
|
|
1710
|
+
<dd>The number of images to generate.</dd>
|
|
1711
|
+
<dt>
|
|
1712
|
+
response_format
|
|
1713
|
+
<a
|
|
1714
|
+
href="https://platform.openai.com/docs/api-reference/images/createVariation#images-createvariation-response_format"
|
|
1715
|
+
target="_blank"
|
|
1716
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1717
|
+
></a>
|
|
1718
|
+
<span class="property-type">string</span>
|
|
1719
|
+
</dt>
|
|
1720
|
+
<dd>The format in which the generated images are returned.</dd>
|
|
1721
|
+
<dt>
|
|
1722
|
+
size
|
|
1723
|
+
<a
|
|
1724
|
+
href="https://platform.openai.com/docs/api-reference/images/createVariation#images-createvariation-size"
|
|
1725
|
+
target="_blank"
|
|
1726
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1727
|
+
></a>
|
|
1728
|
+
<span class="property-type">string</span>
|
|
1729
|
+
</dt>
|
|
1730
|
+
<dd>The size of the generated images.</dd>
|
|
1731
|
+
<dt>
|
|
1732
|
+
user
|
|
1733
|
+
<a
|
|
1734
|
+
href="https://platform.openai.com/docs/api-reference/images/createVariation#images-createvariation-user"
|
|
1735
|
+
target="_blank"
|
|
1736
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1737
|
+
></a>
|
|
1738
|
+
<span class="property-type">string</span>
|
|
1739
|
+
</dt>
|
|
1740
|
+
<dd>
|
|
1741
|
+
A unique identifier representing your end-user, which can help OpenAI to
|
|
1742
|
+
monitor and detect abuse.
|
|
1743
|
+
</dd>
|
|
454
1744
|
</dl>
|
|
455
|
-
|
|
1745
|
+
</section>
|
|
456
1746
|
|
|
457
|
-
|
|
1747
|
+
<section>
|
|
458
1748
|
<h1 style="font-weight: bold;">📟 Messages</h1>
|
|
459
|
-
<a
|
|
1749
|
+
<a
|
|
1750
|
+
href="https://platform.openai.com/docs/api-reference/messages"
|
|
1751
|
+
target="_blank"
|
|
1752
|
+
>Official Documentation
|
|
1753
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1754
|
+
></a>
|
|
460
1755
|
<h2>List Messages</h2>
|
|
461
1756
|
<p>Returns a list of messages for a given thread.</p>
|
|
462
1757
|
<dl class="message-properties">
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
<
|
|
468
|
-
|
|
469
|
-
|
|
1758
|
+
<h2>msg.payload Properties</h2>
|
|
1759
|
+
|
|
1760
|
+
<dt>
|
|
1761
|
+
thread_id
|
|
1762
|
+
<a
|
|
1763
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-thread_id"
|
|
1764
|
+
target="_blank"
|
|
1765
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1766
|
+
></a>
|
|
1767
|
+
<span class="property-type">string</span>
|
|
1768
|
+
</dt>
|
|
1769
|
+
<dd>The ID of the thread the messages belong to.</dd>
|
|
1770
|
+
<dt class="optional">
|
|
1771
|
+
limit
|
|
1772
|
+
<a
|
|
1773
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-limit"
|
|
1774
|
+
target="_blank"
|
|
1775
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1776
|
+
></a>
|
|
1777
|
+
<span class="property-type">integer</span>
|
|
1778
|
+
</dt>
|
|
1779
|
+
<dd>
|
|
1780
|
+
A limit on the number of objects to be returned. Limit can range between
|
|
1781
|
+
1 and 100, and the default is 20.
|
|
1782
|
+
</dd>
|
|
1783
|
+
<dt class="optional">
|
|
1784
|
+
order
|
|
1785
|
+
<a
|
|
1786
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-order"
|
|
1787
|
+
target="_blank"
|
|
1788
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1789
|
+
></a>
|
|
1790
|
+
<span class="property-type">string</span>
|
|
1791
|
+
</dt>
|
|
1792
|
+
<dd>Sort order by the created_at timestamp of the objects.</dd>
|
|
1793
|
+
<dt class="optional">
|
|
1794
|
+
after
|
|
1795
|
+
<a
|
|
1796
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-after"
|
|
1797
|
+
target="_blank"
|
|
1798
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1799
|
+
></a>
|
|
1800
|
+
<span class="property-type">string</span>
|
|
1801
|
+
</dt>
|
|
1802
|
+
<dd>A cursor for use in pagination.</dd>
|
|
1803
|
+
<dt class="optional">
|
|
1804
|
+
before
|
|
1805
|
+
<a
|
|
1806
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-before"
|
|
1807
|
+
target="_blank"
|
|
1808
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1809
|
+
></a>
|
|
1810
|
+
<span class="property-type">string</span>
|
|
1811
|
+
</dt>
|
|
1812
|
+
<dd>A cursor for use in pagination.</dd>
|
|
470
1813
|
</dl>
|
|
471
1814
|
|
|
472
1815
|
<h3>Create Message</h3>
|
|
473
1816
|
<p>Create a message.</p>
|
|
474
1817
|
<dl class="message-properties">
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
<
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
1818
|
+
<h2>msg.payload Properties</h2>
|
|
1819
|
+
|
|
1820
|
+
<dt>
|
|
1821
|
+
thread_id
|
|
1822
|
+
<a
|
|
1823
|
+
href="https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-thread_id"
|
|
1824
|
+
target="_blank"
|
|
1825
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1826
|
+
></a>
|
|
1827
|
+
<span class="property-type">string</span>
|
|
1828
|
+
</dt>
|
|
1829
|
+
<dd>The ID of the thread to create a message for.</dd>
|
|
1830
|
+
<dt>
|
|
1831
|
+
role
|
|
1832
|
+
<a
|
|
1833
|
+
href="https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-role"
|
|
1834
|
+
target="_blank"
|
|
1835
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1836
|
+
></a>
|
|
1837
|
+
<span class="property-type">string</span>
|
|
1838
|
+
</dt>
|
|
1839
|
+
<dd>The role of the entity that is creating the message.</dd>
|
|
1840
|
+
<dt>
|
|
1841
|
+
content
|
|
1842
|
+
<a
|
|
1843
|
+
href="https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-content"
|
|
1844
|
+
target="_blank"
|
|
1845
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1846
|
+
></a>
|
|
1847
|
+
<span class="property-type">string</span>
|
|
1848
|
+
</dt>
|
|
1849
|
+
<dd>The content of the message.</dd>
|
|
1850
|
+
<dt class="optional">
|
|
1851
|
+
file_ids
|
|
1852
|
+
<a
|
|
1853
|
+
href="https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-file_ids"
|
|
1854
|
+
target="_blank"
|
|
1855
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1856
|
+
></a>
|
|
1857
|
+
<span class="property-type">array</span>
|
|
1858
|
+
</dt>
|
|
1859
|
+
<dd>A list of File IDs that the message should use.</dd>
|
|
1860
|
+
<dt class="optional">
|
|
1861
|
+
metadata
|
|
1862
|
+
<a
|
|
1863
|
+
href="https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-metadata"
|
|
1864
|
+
target="_blank"
|
|
1865
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1866
|
+
></a>
|
|
1867
|
+
<span class="property-type">object</span>
|
|
1868
|
+
</dt>
|
|
1869
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
483
1870
|
</dl>
|
|
484
1871
|
|
|
485
1872
|
<h3>Retrieve Message</h3>
|
|
486
1873
|
<p>Retrieve a message.</p>
|
|
487
1874
|
<dl class="message-properties">
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
1875
|
+
<h2>msg.payload Properties</h2>
|
|
1876
|
+
|
|
1877
|
+
<dt>
|
|
1878
|
+
thread_id
|
|
1879
|
+
<a
|
|
1880
|
+
href="https://platform.openai.com/docs/api-reference/messages/getMessage#messages-getmessage-thread_id"
|
|
1881
|
+
target="_blank"
|
|
1882
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1883
|
+
></a>
|
|
1884
|
+
<span class="property-type">string</span>
|
|
1885
|
+
</dt>
|
|
1886
|
+
<dd>The ID of the thread to which this message belongs.</dd>
|
|
1887
|
+
<dt>
|
|
1888
|
+
message_id
|
|
1889
|
+
<a
|
|
1890
|
+
href="https://platform.openai.com/docs/api-reference/messages/getMessage#messages-getmessage-message_id"
|
|
1891
|
+
target="_blank"
|
|
1892
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1893
|
+
></a>
|
|
1894
|
+
<span class="property-type">string</span>
|
|
1895
|
+
</dt>
|
|
1896
|
+
<dd>The ID of the message to retrieve.</dd>
|
|
492
1897
|
</dl>
|
|
493
1898
|
|
|
494
1899
|
<h3>Modify Message</h3>
|
|
495
1900
|
<p>Modifies a message.</p>
|
|
496
1901
|
<dl class="message-properties">
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
1902
|
+
<h2>msg.payload Properties</h2>
|
|
1903
|
+
|
|
1904
|
+
<dt>
|
|
1905
|
+
thread_id
|
|
1906
|
+
<a
|
|
1907
|
+
href="https://platform.openai.com/docs/api-reference/messages/modifyMessage#messages-modifymessage-thread_id"
|
|
1908
|
+
target="_blank"
|
|
1909
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1910
|
+
></a>
|
|
1911
|
+
<span class="property-type">string</span>
|
|
1912
|
+
</dt>
|
|
1913
|
+
<dd>The ID of the thread to which this message belongs.</dd>
|
|
1914
|
+
<dt>
|
|
1915
|
+
message_id
|
|
1916
|
+
<a
|
|
1917
|
+
href="https://platform.openai.com/docs/api-reference/messages/modifyMessage#messages-modifymessage-message_id"
|
|
1918
|
+
target="_blank"
|
|
1919
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1920
|
+
></a>
|
|
1921
|
+
<span class="property-type">string</span>
|
|
1922
|
+
</dt>
|
|
1923
|
+
<dd>The ID of the message to modify.</dd>
|
|
1924
|
+
<dt class="optional">
|
|
1925
|
+
metadata
|
|
1926
|
+
<a
|
|
1927
|
+
href="https://platform.openai.com/docs/api-reference/messages/modifyMessage#messages-modifymessage-metadata"
|
|
1928
|
+
target="_blank"
|
|
1929
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1930
|
+
></a>
|
|
1931
|
+
<span class="property-type">object</span>
|
|
1932
|
+
</dt>
|
|
1933
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
503
1934
|
</dl>
|
|
504
1935
|
|
|
505
1936
|
<h3>List Message Files</h3>
|
|
506
1937
|
<p>Returns a list of message files.</p>
|
|
507
1938
|
<dl class="message-properties">
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
<
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
1939
|
+
<h2>msg.payload Properties</h2>
|
|
1940
|
+
|
|
1941
|
+
<dt>
|
|
1942
|
+
thread_id
|
|
1943
|
+
<a
|
|
1944
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-thread_id"
|
|
1945
|
+
target="_blank"
|
|
1946
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1947
|
+
></a>
|
|
1948
|
+
<span class="property-type">string</span>
|
|
1949
|
+
</dt>
|
|
1950
|
+
<dd>The ID of the thread that the message and files belong to.</dd>
|
|
1951
|
+
<dt>
|
|
1952
|
+
message_id
|
|
1953
|
+
<a
|
|
1954
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-message_id"
|
|
1955
|
+
target="_blank"
|
|
1956
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1957
|
+
></a>
|
|
1958
|
+
<span class="property-type">string</span>
|
|
1959
|
+
</dt>
|
|
1960
|
+
<dd>The ID of the message that the files belongs to.</dd>
|
|
1961
|
+
<dt class="optional">
|
|
1962
|
+
limit
|
|
1963
|
+
<a
|
|
1964
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-limit"
|
|
1965
|
+
target="_blank"
|
|
1966
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1967
|
+
></a>
|
|
1968
|
+
<span class="property-type">integer</span>
|
|
1969
|
+
</dt>
|
|
1970
|
+
<dd>A limit on the number of objects to be returned.</dd>
|
|
1971
|
+
<dt class="optional">
|
|
1972
|
+
order
|
|
1973
|
+
<a
|
|
1974
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-order"
|
|
1975
|
+
target="_blank"
|
|
1976
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1977
|
+
></a>
|
|
1978
|
+
<span class="property-type">string</span>
|
|
1979
|
+
</dt>
|
|
1980
|
+
<dd>Sort order by the created_at timestamp of the objects.</dd>
|
|
1981
|
+
<dt class="optional">
|
|
1982
|
+
after
|
|
1983
|
+
<a
|
|
1984
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-after"
|
|
1985
|
+
target="_blank"
|
|
1986
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1987
|
+
></a>
|
|
1988
|
+
<span class="property-type">string</span>
|
|
1989
|
+
</dt>
|
|
1990
|
+
<dd>A cursor for use in pagination.</dd>
|
|
1991
|
+
<dt class="optional">
|
|
1992
|
+
before
|
|
1993
|
+
<a
|
|
1994
|
+
href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-before"
|
|
1995
|
+
target="_blank"
|
|
1996
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1997
|
+
></a>
|
|
1998
|
+
<span class="property-type">string</span>
|
|
1999
|
+
</dt>
|
|
2000
|
+
<dd>A cursor for use in pagination.</dd>
|
|
516
2001
|
</dl>
|
|
517
2002
|
|
|
518
2003
|
<h3>Retrieve Message File</h3>
|
|
519
2004
|
<p>Retrieves a message file.</p>
|
|
520
2005
|
<dl class="message-properties">
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
<
|
|
2006
|
+
<h2>msg.payload Properties</h2>
|
|
2007
|
+
|
|
2008
|
+
<dt>
|
|
2009
|
+
thread_id
|
|
2010
|
+
<a
|
|
2011
|
+
href="https://platform.openai.com/docs/api-reference/messages/getMessageFile#messages-getmessagefile-thread_id"
|
|
2012
|
+
target="_blank"
|
|
2013
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2014
|
+
></a>
|
|
2015
|
+
<span class="property-type">string</span>
|
|
2016
|
+
</dt>
|
|
2017
|
+
<dd>The ID of the thread to which the message and File belong.</dd>
|
|
2018
|
+
<dt>
|
|
2019
|
+
message_id
|
|
2020
|
+
<a
|
|
2021
|
+
href="https://platform.openai.com/docs/api-reference/messages/getMessageFile#messages-getmessagefile-message_id"
|
|
2022
|
+
target="_blank"
|
|
2023
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2024
|
+
></a>
|
|
2025
|
+
<span class="property-type">string</span>
|
|
2026
|
+
</dt>
|
|
2027
|
+
<dd>The ID of the message the file belongs to.</dd>
|
|
2028
|
+
<dt>
|
|
2029
|
+
file_id
|
|
2030
|
+
<a
|
|
2031
|
+
href="https://platform.openai.com/docs/api-reference/messages/getMessageFile#messages-getmessagefile-file_id"
|
|
2032
|
+
target="_blank"
|
|
2033
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2034
|
+
></a>
|
|
2035
|
+
<span class="property-type">string</span>
|
|
2036
|
+
</dt>
|
|
2037
|
+
<dd>The ID of the file being retrieved.</dd>
|
|
526
2038
|
</dl>
|
|
527
|
-
|
|
2039
|
+
</section>
|
|
528
2040
|
|
|
529
|
-
|
|
2041
|
+
<section>
|
|
530
2042
|
<h1 style="font-weight: bold;">🧠 Models</h1>
|
|
531
|
-
<a
|
|
2043
|
+
<a
|
|
2044
|
+
href="https://platform.openai.com/docs/api-reference/models"
|
|
2045
|
+
target="_blank"
|
|
2046
|
+
>Official Documentation
|
|
2047
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2048
|
+
></a>
|
|
532
2049
|
<h2>List Models</h2>
|
|
533
|
-
<p>
|
|
2050
|
+
<p>
|
|
2051
|
+
Lists the currently available models, and provides basic information about
|
|
2052
|
+
each one such as the owner and availability.
|
|
2053
|
+
</p>
|
|
534
2054
|
<dl class="message-properties"></dl>
|
|
535
2055
|
|
|
536
2056
|
<h2>Retrieve Model</h2>
|
|
537
|
-
<p>
|
|
2057
|
+
<p>
|
|
2058
|
+
Retrieves a model instance, providing basic information about the model
|
|
2059
|
+
such as the owner and permissioning.
|
|
2060
|
+
</p>
|
|
538
2061
|
<dl class="message-properties">
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
2062
|
+
<h2>msg.payload Properties</h2>
|
|
2063
|
+
|
|
2064
|
+
<dt>
|
|
2065
|
+
model
|
|
2066
|
+
<a
|
|
2067
|
+
href="https://platform.openai.com/docs/api-reference/models/retrieve#models-retrieve-model"
|
|
2068
|
+
target="_blank"
|
|
2069
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2070
|
+
></a>
|
|
2071
|
+
<span class="property-type">string</span>
|
|
2072
|
+
</dt>
|
|
2073
|
+
<dd>The ID of the model to use for this request</dd>
|
|
542
2074
|
</dl>
|
|
543
2075
|
|
|
544
2076
|
<h2>Delete Fine-tun Model</h2>
|
|
545
|
-
<p>
|
|
2077
|
+
<p>
|
|
2078
|
+
Delete a fine-tuned model. You must have the Owner role in your
|
|
2079
|
+
organization to delete a model.
|
|
2080
|
+
</p>
|
|
546
2081
|
<dl class="message-properties">
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
2082
|
+
<h2>msg.payload Properties</h2>
|
|
2083
|
+
|
|
2084
|
+
<dt>
|
|
2085
|
+
model
|
|
2086
|
+
<a
|
|
2087
|
+
href="https://platform.openai.com/docs/api-reference/models/delete#models-delete-model"
|
|
2088
|
+
target="_blank"
|
|
2089
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2090
|
+
></a>
|
|
2091
|
+
<span class="property-type">string</span>
|
|
2092
|
+
</dt>
|
|
2093
|
+
<dd>The model to delete</dd>
|
|
550
2094
|
</dl>
|
|
551
2095
|
|
|
552
2096
|
<section>
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
2097
|
+
<h1 style="font-weight: bold;">✅ Moderations</h1>
|
|
2098
|
+
<a
|
|
2099
|
+
href="https://platform.openai.com/docs/api-reference/moderations"
|
|
2100
|
+
target="_blank"
|
|
2101
|
+
>Official Documentation
|
|
2102
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2103
|
+
></a>
|
|
2104
|
+
<h2>Create Moderation</h2>
|
|
2105
|
+
<p>Classifies if text violates OpenAI's Content Policy</p>
|
|
2106
|
+
<dl class="message-properties">
|
|
558
2107
|
<h2>msg.payload Properties</h2>
|
|
559
|
-
|
|
560
|
-
<dt>
|
|
561
|
-
|
|
562
|
-
|
|
2108
|
+
|
|
2109
|
+
<dt>
|
|
2110
|
+
input
|
|
2111
|
+
<a
|
|
2112
|
+
href="https://platform.openai.com/docs/api-reference/moderations/create#moderations-create-input"
|
|
2113
|
+
target="_blank"
|
|
2114
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2115
|
+
></a>
|
|
2116
|
+
<span class="property-type">string | array</span>
|
|
2117
|
+
</dt>
|
|
2118
|
+
<dd>The input text to classify</dd>
|
|
2119
|
+
<dt class="optional">
|
|
2120
|
+
model
|
|
2121
|
+
<a
|
|
2122
|
+
href="https://platform.openai.com/docs/api-reference/moderations/create#moderations-create-model"
|
|
2123
|
+
target="_blank"
|
|
2124
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2125
|
+
></a>
|
|
2126
|
+
<span class="property-type">string</span>
|
|
2127
|
+
</dt>
|
|
2128
|
+
<dd>
|
|
2129
|
+
Two content moderations models are available: text-moderation-stable
|
|
2130
|
+
and text-moderation-latest.
|
|
2131
|
+
</dd>
|
|
2132
|
+
</dl>
|
|
563
2133
|
</section>
|
|
564
2134
|
|
|
565
2135
|
<section>
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
2136
|
+
<h1 style="font-weight: bold;">🔄 Runs</h1>
|
|
2137
|
+
<a
|
|
2138
|
+
href="https://platform.openai.com/docs/api-reference/runs"
|
|
2139
|
+
target="_blank"
|
|
2140
|
+
>Official Documentation</a
|
|
2141
|
+
>
|
|
2142
|
+
<h2>Create Thread and Run</h2>
|
|
2143
|
+
<p>Create a thread and run it in one request.</p>
|
|
2144
|
+
<dl class="message-properties">
|
|
571
2145
|
<h2>msg.payload Properties</h2>
|
|
572
|
-
|
|
573
|
-
<dt>assistant_id <span class="property-type"></span></dt>
|
|
574
|
-
<dt class="optional">thread <span class="property-type">object</span></dt>
|
|
575
|
-
<dt class="optional">model <span class="property-type">string</span></dt>
|
|
576
|
-
<dt class="optional">instructions <span class="property-type">string</span></dt>
|
|
577
|
-
<dt class="optional">tools <span class="property-type">array</span></dt>
|
|
578
|
-
<dt class="optional">metadata <span class="property-type">object</span></dt>
|
|
579
|
-
</dl>
|
|
580
2146
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
2147
|
+
<dt>
|
|
2148
|
+
assistant_id
|
|
2149
|
+
<a
|
|
2150
|
+
href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-assistant_id"
|
|
2151
|
+
target="_blank"
|
|
2152
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2153
|
+
></a>
|
|
2154
|
+
<span class="property-type">string</span>
|
|
2155
|
+
</dt>
|
|
2156
|
+
<dd>The ID of the assistant to use to execute this run.</dd>
|
|
2157
|
+
<dt class="optional">
|
|
2158
|
+
thread
|
|
2159
|
+
<a
|
|
2160
|
+
href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-thread"
|
|
2161
|
+
target="_blank"
|
|
2162
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2163
|
+
></a>
|
|
2164
|
+
<span class="property-type">object</span>
|
|
2165
|
+
</dt>
|
|
2166
|
+
<dt class="optional">
|
|
2167
|
+
model
|
|
2168
|
+
<a
|
|
2169
|
+
href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-model"
|
|
2170
|
+
target="_blank"
|
|
2171
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2172
|
+
></a>
|
|
2173
|
+
<span class="property-type">string</span>
|
|
2174
|
+
</dt>
|
|
2175
|
+
<dd>The ID of the Model to be used to execute this run.</dd>
|
|
2176
|
+
<dt class="optional">
|
|
2177
|
+
instructions
|
|
2178
|
+
<a
|
|
2179
|
+
href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-instructions"
|
|
2180
|
+
target="_blank"
|
|
2181
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2182
|
+
></a>
|
|
2183
|
+
<span class="property-type">string</span>
|
|
2184
|
+
</dt>
|
|
2185
|
+
<dd>Override the default system message of the assistant.</dd>
|
|
2186
|
+
<dt class="optional">
|
|
2187
|
+
tools
|
|
2188
|
+
<a
|
|
2189
|
+
href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-tools"
|
|
2190
|
+
target="_blank"
|
|
2191
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2192
|
+
></a>
|
|
2193
|
+
<span class="property-type">array</span>
|
|
2194
|
+
</dt>
|
|
2195
|
+
<dd>Override the tools the assistant can use for this run.</dd>
|
|
2196
|
+
<dt class="optional">
|
|
2197
|
+
metadata
|
|
2198
|
+
<a
|
|
2199
|
+
href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-metadata"
|
|
2200
|
+
target="_blank"
|
|
2201
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2202
|
+
></a>
|
|
2203
|
+
<span class="property-type">object</span>
|
|
2204
|
+
</dt>
|
|
2205
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
2206
|
+
</dl>
|
|
2207
|
+
|
|
2208
|
+
<h2>List Runs</h2>
|
|
2209
|
+
<p>Returns a list of runs belonging to a thread.</p>
|
|
2210
|
+
<dl class="message-properties">
|
|
584
2211
|
<h2>msg.payload Properties</h2>
|
|
585
|
-
|
|
586
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
587
|
-
|
|
588
|
-
<dt class="optional">limit <span class="property-type">integer</span></dt>
|
|
589
|
-
<dt class="optional">order <span class="property-type">string</span></dt>
|
|
590
|
-
<dt class="optional">after <span class="property-type">string</span></dt>
|
|
591
|
-
<dt class="optional">before <span class="property-type">string</span></dt>
|
|
592
|
-
</dl>
|
|
593
2212
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
2213
|
+
<dt>
|
|
2214
|
+
thread_id
|
|
2215
|
+
<a
|
|
2216
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRuns#runs-listruns-thread_id"
|
|
2217
|
+
target="_blank"
|
|
2218
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2219
|
+
></a>
|
|
2220
|
+
<span class="property-type">string</span>
|
|
2221
|
+
</dt>
|
|
2222
|
+
<dd>The ID of the thread the run belongs to.</dd>
|
|
2223
|
+
<dt class="optional">
|
|
2224
|
+
limit
|
|
2225
|
+
<a
|
|
2226
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRuns#runs-listruns-limit"
|
|
2227
|
+
target="_blank"
|
|
2228
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2229
|
+
></a>
|
|
2230
|
+
<span class="property-type">integer</span>
|
|
2231
|
+
</dt>
|
|
2232
|
+
<dd>A limit on the number of objects to be returned.</dd>
|
|
2233
|
+
<dt class="optional">
|
|
2234
|
+
order
|
|
2235
|
+
<a
|
|
2236
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRuns#runs-listruns-order"
|
|
2237
|
+
target="_blank"
|
|
2238
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2239
|
+
></a>
|
|
2240
|
+
<span class="property-type">string</span>
|
|
2241
|
+
</dt>
|
|
2242
|
+
<dd>Sort order by the created_at timestamp of the objects.</dd>
|
|
2243
|
+
<dt class="optional">
|
|
2244
|
+
after
|
|
2245
|
+
<a
|
|
2246
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRuns#runs-listruns-after"
|
|
2247
|
+
target="_blank"
|
|
2248
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2249
|
+
></a>
|
|
2250
|
+
<span class="property-type">string</span>
|
|
2251
|
+
</dt>
|
|
2252
|
+
<dd>A cursor for use in pagination.</dd>
|
|
2253
|
+
<dt class="optional">
|
|
2254
|
+
before
|
|
2255
|
+
<a
|
|
2256
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRuns#runs-listruns-before"
|
|
2257
|
+
target="_blank"
|
|
2258
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2259
|
+
></a>
|
|
2260
|
+
<span class="property-type">string</span>
|
|
2261
|
+
</dt>
|
|
2262
|
+
<dd>A cursor for use in pagination.</dd>
|
|
2263
|
+
</dl>
|
|
2264
|
+
|
|
2265
|
+
<h2>Create Run</h2>
|
|
2266
|
+
<p>Create a run.</p>
|
|
2267
|
+
<dl class="message-properties">
|
|
597
2268
|
<h2>msg.payload Properties</h2>
|
|
598
|
-
|
|
599
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
600
|
-
|
|
601
|
-
<dt>assistant_id <span class="property-type">string</span></dt>
|
|
602
|
-
<dt class="optional">model <span class="property-type">string</span></dt>
|
|
603
|
-
<dt class="optional">instructions <span class="property-type">string</span></dt>
|
|
604
|
-
<dt class="optional">tools <span class="property-type"></span>array</dt>
|
|
605
|
-
<dt class="optional">metadata <span class="property-type">object</span></dt>
|
|
606
|
-
</dl>
|
|
607
2269
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
2270
|
+
<dt>
|
|
2271
|
+
thread_id
|
|
2272
|
+
<a
|
|
2273
|
+
href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-thread_id"
|
|
2274
|
+
target="_blank"
|
|
2275
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2276
|
+
></a>
|
|
2277
|
+
<span class="property-type">string</span>
|
|
2278
|
+
</dt>
|
|
2279
|
+
<dd>The ID of the thread to run.</dd>
|
|
2280
|
+
<dt>
|
|
2281
|
+
assistant_id
|
|
2282
|
+
<a
|
|
2283
|
+
href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-assistant_id"
|
|
2284
|
+
target="_blank"
|
|
2285
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2286
|
+
></a>
|
|
2287
|
+
<span class="property-type">string</span>
|
|
2288
|
+
</dt>
|
|
2289
|
+
<dd>The ID of the assistant to use to execute this run.</dd>
|
|
2290
|
+
<dt class="optional">
|
|
2291
|
+
model
|
|
2292
|
+
<a
|
|
2293
|
+
href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-model"
|
|
2294
|
+
target="_blank"
|
|
2295
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2296
|
+
></a>
|
|
2297
|
+
<span class="property-type">string</span>
|
|
2298
|
+
</dt>
|
|
2299
|
+
<dd>The ID of the Model to be used to execute this run.</dd>
|
|
2300
|
+
<dt class="optional">
|
|
2301
|
+
instructions
|
|
2302
|
+
<a
|
|
2303
|
+
href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-instructions"
|
|
2304
|
+
target="_blank"
|
|
2305
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2306
|
+
></a>
|
|
2307
|
+
<span class="property-type">string</span>
|
|
2308
|
+
</dt>
|
|
2309
|
+
<dd>
|
|
2310
|
+
Appends additional instructions at the end of the instructions for the
|
|
2311
|
+
run.
|
|
2312
|
+
</dd>
|
|
2313
|
+
<dt class="optional">
|
|
2314
|
+
tools
|
|
2315
|
+
<a
|
|
2316
|
+
href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-tools"
|
|
2317
|
+
target="_blank"
|
|
2318
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2319
|
+
></a>
|
|
2320
|
+
<span class="property-type"></span>array
|
|
2321
|
+
</dt>
|
|
2322
|
+
<dd>Override the tools the assistant can use for this run.</dd>
|
|
2323
|
+
<dt class="optional">
|
|
2324
|
+
metadata
|
|
2325
|
+
<a
|
|
2326
|
+
href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-metadata"
|
|
2327
|
+
target="_blank"
|
|
2328
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2329
|
+
></a>
|
|
2330
|
+
<span class="property-type">object</span>
|
|
2331
|
+
</dt>
|
|
2332
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
2333
|
+
</dl>
|
|
2334
|
+
|
|
2335
|
+
<h2>Retrieve Run</h2>
|
|
2336
|
+
<p>Retrieves a run.</p>
|
|
2337
|
+
<dl class="message-properties">
|
|
611
2338
|
<h2>msg.payload Properties</h2>
|
|
612
|
-
|
|
2339
|
+
|
|
613
2340
|
<dt>thread_id <span class="property-type">string</span></dt>
|
|
2341
|
+
<dd>The ID of the thread that was run.</dd>
|
|
614
2342
|
<dt>run_id <span class="property-type">string</span></dt>
|
|
615
|
-
|
|
2343
|
+
<dd>The ID of the run to retrieve.</dd>
|
|
2344
|
+
</dl>
|
|
616
2345
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
2346
|
+
<h2>Modify Run</h2>
|
|
2347
|
+
<p>Modifies a run.</p>
|
|
2348
|
+
<dl class="message-properties">
|
|
620
2349
|
<h2>msg.payload Properties</h2>
|
|
621
|
-
|
|
622
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
623
|
-
<dt>run_id <span class="property-type">string</span></dt>
|
|
624
|
-
|
|
625
|
-
<dt class="optional">metadata <span class="property-type">object</span></dt>
|
|
626
|
-
</dl>
|
|
627
2350
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
2351
|
+
<dt>
|
|
2352
|
+
thread_id
|
|
2353
|
+
<a
|
|
2354
|
+
href="https://platform.openai.com/docs/api-reference/runs/getRun#runs-getrun-thread_id"
|
|
2355
|
+
target="_blank"
|
|
2356
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2357
|
+
></a>
|
|
2358
|
+
<span class="property-type">string</span>
|
|
2359
|
+
</dt>
|
|
2360
|
+
<dd>The ID of the thread that was run.</dd>
|
|
2361
|
+
<dt>
|
|
2362
|
+
run_id
|
|
2363
|
+
<a
|
|
2364
|
+
href="https://platform.openai.com/docs/api-reference/runs/getRun#runs-getrun-run_id"
|
|
2365
|
+
target="_blank"
|
|
2366
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2367
|
+
></a>
|
|
2368
|
+
<span class="property-type">string</span>
|
|
2369
|
+
</dt>
|
|
2370
|
+
<dd>The ID of the run to modify.</dd>
|
|
2371
|
+
<dt class="optional">
|
|
2372
|
+
metadata
|
|
2373
|
+
<a
|
|
2374
|
+
href="https://platform.openai.com/docs/api-reference/runs/modifyRun#runs-modifyrun-metadata"
|
|
2375
|
+
target="_blank"
|
|
2376
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2377
|
+
></a>
|
|
2378
|
+
<span class="property-type">object</span>
|
|
2379
|
+
</dt>
|
|
2380
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
2381
|
+
</dl>
|
|
2382
|
+
|
|
2383
|
+
<h2>Submit Tool Outputs to Run</h2>
|
|
2384
|
+
<p>
|
|
2385
|
+
When a run has the `status: "requires_action"` and
|
|
2386
|
+
`required_action.type` is `submit_tool_outputs`, this endpoint can be
|
|
2387
|
+
used to submit the outputs from the tool calls once they're all
|
|
2388
|
+
completed. All outputs must be submitted in a single request.
|
|
2389
|
+
</p>
|
|
2390
|
+
<dl class="message-properties">
|
|
631
2391
|
<h2>msg.payload Properties</h2>
|
|
632
|
-
|
|
633
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
634
|
-
<dt>run_id <span class="property-type">string</span></dt>
|
|
635
|
-
|
|
636
|
-
<dt>tool_outputs <span class="property-type">array</span></dt>
|
|
637
|
-
</dl>
|
|
638
2392
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
2393
|
+
<dt>
|
|
2394
|
+
thread_id
|
|
2395
|
+
<a
|
|
2396
|
+
href="https://platform.openai.com/docs/api-reference/runs/submitToolOutputs#runs-submittooloutputs-thread_id"
|
|
2397
|
+
target="_blank"
|
|
2398
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2399
|
+
></a>
|
|
2400
|
+
<span class="property-type">string</span>
|
|
2401
|
+
</dt>
|
|
2402
|
+
<dd>The ID of the thread to which this run belongs.</dd>
|
|
2403
|
+
<dt>
|
|
2404
|
+
run_id
|
|
2405
|
+
<a
|
|
2406
|
+
href="https://platform.openai.com/docs/api-reference/runs/submitToolOutputs#runs-submittooloutputs-run_id"
|
|
2407
|
+
target="_blank"
|
|
2408
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2409
|
+
></a>
|
|
2410
|
+
<span class="property-type">string</span>
|
|
2411
|
+
</dt>
|
|
2412
|
+
<dd>The ID of the run that requires the tool output submission.</dd>
|
|
2413
|
+
<dt>
|
|
2414
|
+
tool_outputs
|
|
2415
|
+
<a
|
|
2416
|
+
href="https://platform.openai.com/docs/api-reference/runs/submitToolOutputs#runs-submittooloutputs-tool_outputs"
|
|
2417
|
+
target="_blank"
|
|
2418
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2419
|
+
></a>
|
|
2420
|
+
<span class="property-type">array</span>
|
|
2421
|
+
</dt>
|
|
2422
|
+
<dd>A list of tools for which the outputs are being submitted.</dd>
|
|
2423
|
+
</dl>
|
|
2424
|
+
|
|
2425
|
+
<h2>Cancel Run</h2>
|
|
2426
|
+
<p>Cancels a run that is `in_progress`.</p>
|
|
2427
|
+
<dl class="message-properties">
|
|
642
2428
|
<h2>msg.payload Properties</h2>
|
|
643
|
-
|
|
644
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
645
|
-
<dt>run_id <span class="property-type">string</span></dt>
|
|
646
|
-
</dl>
|
|
647
2429
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
2430
|
+
<dt>
|
|
2431
|
+
thread_id
|
|
2432
|
+
<a
|
|
2433
|
+
href="https://platform.openai.com/docs/api-reference/runs/cancelRun#runs-cancelrun-thread_id"
|
|
2434
|
+
target="_blank"
|
|
2435
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2436
|
+
></a>
|
|
2437
|
+
<span class="property-type">string</span>
|
|
2438
|
+
</dt>
|
|
2439
|
+
<dd>The ID of the thread to which this run belongs.</dd>
|
|
2440
|
+
<dt>
|
|
2441
|
+
run_id
|
|
2442
|
+
<a
|
|
2443
|
+
href="https://platform.openai.com/docs/api-reference/runs/cancelRun#runs-cancelrun-run_id"
|
|
2444
|
+
target="_blank"
|
|
2445
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2446
|
+
></a>
|
|
2447
|
+
<span class="property-type">string</span>
|
|
2448
|
+
</dt>
|
|
2449
|
+
<dd>The ID of the run to cancel.</dd>
|
|
2450
|
+
</dl>
|
|
2451
|
+
|
|
2452
|
+
<h2>List Run Steps</h2>
|
|
2453
|
+
<p>Returns a list of run steps belonging to a run.</p>
|
|
2454
|
+
<dl class="message-properties">
|
|
651
2455
|
<h2>msg.payload Properties</h2>
|
|
652
|
-
|
|
653
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
654
|
-
<dt>run_id <span class="property-type">string</span></dt>
|
|
655
|
-
<dt class="optional">limit <span class="property-type">integer</span></dt>
|
|
656
|
-
<dt class="optional">order <span class="property-type">string</span></dt>
|
|
657
|
-
<dt class="optional">after <span class="property-type">string</span></dt>
|
|
658
|
-
<dt class="optional">before <span class="property-type">string</span></dt>
|
|
659
|
-
</dl>
|
|
660
2456
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
2457
|
+
<dt>
|
|
2458
|
+
thread_id
|
|
2459
|
+
<a
|
|
2460
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRunSteps#runs-listrunsteps-thread_id"
|
|
2461
|
+
target="_blank"
|
|
2462
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2463
|
+
></a>
|
|
2464
|
+
<span class="property-type">string</span>
|
|
2465
|
+
</dt>
|
|
2466
|
+
<dd>The ID of the thread the run and run steps belong to.</dd>
|
|
2467
|
+
<dt>
|
|
2468
|
+
run_id
|
|
2469
|
+
<a
|
|
2470
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRunSteps#runs-listrunsteps-run_id"
|
|
2471
|
+
target="_blank"
|
|
2472
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2473
|
+
></a>
|
|
2474
|
+
<span class="property-type">string</span>
|
|
2475
|
+
</dt>
|
|
2476
|
+
<dd>The ID of the run the run steps belong to.</dd>
|
|
2477
|
+
<dt class="optional">
|
|
2478
|
+
limit
|
|
2479
|
+
<a
|
|
2480
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRunSteps#runs-listrunsteps-limit"
|
|
2481
|
+
target="_blank"
|
|
2482
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2483
|
+
></a>
|
|
2484
|
+
<span class="property-type">integer</span>
|
|
2485
|
+
</dt>
|
|
2486
|
+
<dd>A limit on the number of objects to be returned.</dd>
|
|
2487
|
+
<dt class="optional">
|
|
2488
|
+
order
|
|
2489
|
+
<a
|
|
2490
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRunSteps#runs-listrunsteps-order"
|
|
2491
|
+
target="_blank"
|
|
2492
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2493
|
+
></a>
|
|
2494
|
+
<span class="property-type">string</span>
|
|
2495
|
+
</dt>
|
|
2496
|
+
<dd>Sort order by the created_at timestamp of the objects.</dd>
|
|
2497
|
+
<dt class="optional">
|
|
2498
|
+
after
|
|
2499
|
+
<a
|
|
2500
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRunSteps#runs-listrunsteps-after"
|
|
2501
|
+
target="_blank"
|
|
2502
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2503
|
+
></a>
|
|
2504
|
+
<span class="property-type">string</span>
|
|
2505
|
+
</dt>
|
|
2506
|
+
<dd>A cursor for use in pagination.</dd>
|
|
2507
|
+
<dt class="optional">
|
|
2508
|
+
before
|
|
2509
|
+
<a
|
|
2510
|
+
href="https://platform.openai.com/docs/api-reference/runs/listRunSteps#runs-listrunsteps-before"
|
|
2511
|
+
target="_blank"
|
|
2512
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2513
|
+
></a>
|
|
2514
|
+
<span class="property-type">string</span>
|
|
2515
|
+
</dt>
|
|
2516
|
+
<dd>A cursor for use in pagination.</dd>
|
|
2517
|
+
</dl>
|
|
2518
|
+
|
|
2519
|
+
<h2>Retrieve Run Step</h2>
|
|
2520
|
+
<p>Retrieves a run step.</p>
|
|
2521
|
+
<dl class="message-properties">
|
|
664
2522
|
<h2>msg.payload Properties</h2>
|
|
665
|
-
|
|
666
|
-
<dt>
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
2523
|
+
|
|
2524
|
+
<dt>
|
|
2525
|
+
thread_id
|
|
2526
|
+
<a
|
|
2527
|
+
href="https://platform.openai.com/docs/api-reference/runs/getRunStep#runs-getrunstep-thread_id"
|
|
2528
|
+
target="_blank"
|
|
2529
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2530
|
+
></a>
|
|
2531
|
+
<span class="property-type">string</span>
|
|
2532
|
+
</dt>
|
|
2533
|
+
<dd>The ID of the thread to which the run and run step belongs.</dd>
|
|
2534
|
+
<dt>
|
|
2535
|
+
run_id
|
|
2536
|
+
<a
|
|
2537
|
+
href="https://platform.openai.com/docs/api-reference/runs/getRunStep#runs-getrunstep-run_id"
|
|
2538
|
+
target="_blank"
|
|
2539
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2540
|
+
></a>
|
|
2541
|
+
<span class="property-type">string</span>
|
|
2542
|
+
</dt>
|
|
2543
|
+
<dd>The ID of the run to which the run step belongs.</dd>
|
|
2544
|
+
<dt>
|
|
2545
|
+
step_id
|
|
2546
|
+
<a
|
|
2547
|
+
href="https://platform.openai.com/docs/api-reference/runs/getRunStep#runs-getrunstep-step_id"
|
|
2548
|
+
target="_blank"
|
|
2549
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2550
|
+
></a>
|
|
2551
|
+
<span class="property-type">string</span>
|
|
2552
|
+
</dt>
|
|
2553
|
+
<dd>The ID of the run step to retrieve.</dd>
|
|
2554
|
+
</dl>
|
|
670
2555
|
</section>
|
|
671
2556
|
|
|
672
2557
|
<section>
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
2558
|
+
<h1 style="font-weight: bold;">🧵 Threads</h1>
|
|
2559
|
+
<a
|
|
2560
|
+
href="https://platform.openai.com/docs/api-reference/threads"
|
|
2561
|
+
target="_blank"
|
|
2562
|
+
>Official Documentation
|
|
2563
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2564
|
+
></a>
|
|
2565
|
+
<h2>Create Thread</h2>
|
|
2566
|
+
<p>Create a thread.</p>
|
|
2567
|
+
<dl class="message-properties">
|
|
678
2568
|
<h2>msg.payload Properties</h2>
|
|
679
|
-
|
|
680
|
-
<dt class="optional">messages <span class="property-type">array</span></dt>
|
|
681
|
-
<dt class="optional">metadata <span class="property-type">object</span></dt>
|
|
682
|
-
</dl>
|
|
683
2569
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
2570
|
+
<dt class="optional">
|
|
2571
|
+
messages
|
|
2572
|
+
<a
|
|
2573
|
+
href="https://platform.openai.com/docs/api-reference/threads/createThread#threads-createthread-messages"
|
|
2574
|
+
target="_blank"
|
|
2575
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2576
|
+
></a>
|
|
2577
|
+
<span class="property-type">array</span>
|
|
2578
|
+
</dt>
|
|
2579
|
+
<dd>A list of messages to start the thread with.</dd>
|
|
2580
|
+
<dt class="optional">
|
|
2581
|
+
metadata
|
|
2582
|
+
<a
|
|
2583
|
+
href="https://platform.openai.com/docs/api-reference/threads/createThread#threads-createthread-metadata"
|
|
2584
|
+
target="_blank"
|
|
2585
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2586
|
+
></a>
|
|
2587
|
+
<span class="property-type">object</span>
|
|
2588
|
+
</dt>
|
|
2589
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
2590
|
+
</dl>
|
|
2591
|
+
|
|
2592
|
+
<h2>Retrieve Thread</h2>
|
|
2593
|
+
<p>Retrieves a thread.</p>
|
|
2594
|
+
<dl class="message-properties">
|
|
687
2595
|
<h2>msg.payload Properties</h2>
|
|
688
|
-
|
|
689
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
690
|
-
</dl>
|
|
691
2596
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
2597
|
+
<dt>
|
|
2598
|
+
thread_id
|
|
2599
|
+
<a
|
|
2600
|
+
href="https://platform.openai.com/docs/api-reference/threads/getThread#threads-getthread-thread_id"
|
|
2601
|
+
target="_blank"
|
|
2602
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2603
|
+
></a>
|
|
2604
|
+
<span class="property-type">string</span>
|
|
2605
|
+
</dt>
|
|
2606
|
+
<dd>The ID of the thread to retrieve.</dd>
|
|
2607
|
+
</dl>
|
|
2608
|
+
|
|
2609
|
+
<h2>Modify Thread</h2>
|
|
2610
|
+
<p>Modifies a thread.</p>
|
|
2611
|
+
<dl class="message-properties">
|
|
695
2612
|
<h2>msg.payload Properties</h2>
|
|
696
|
-
|
|
697
|
-
<dt>thread_id <span class="property-type">string</span></dt>
|
|
698
|
-
|
|
699
|
-
<dt class="optional">metadata <span class="property-type">object</span></dt>
|
|
700
|
-
</dl>
|
|
701
2613
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
2614
|
+
<dt>
|
|
2615
|
+
thread_id
|
|
2616
|
+
<a
|
|
2617
|
+
href="https://platform.openai.com/docs/api-reference/threads/modifyThread#threads-modifythread-thread_id"
|
|
2618
|
+
target="_blank"
|
|
2619
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2620
|
+
></a>
|
|
2621
|
+
<span class="property-type">string</span>
|
|
2622
|
+
</dt>
|
|
2623
|
+
<dd>
|
|
2624
|
+
The ID of the thread to modify. Only the metadata can be modified.
|
|
2625
|
+
</dd>
|
|
2626
|
+
<dt class="optional">
|
|
2627
|
+
metadata
|
|
2628
|
+
<a
|
|
2629
|
+
href="https://platform.openai.com/docs/api-reference/threads/modifyThread#threads-modifythread-metadata"
|
|
2630
|
+
target="_blank"
|
|
2631
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2632
|
+
></a>
|
|
2633
|
+
<span class="property-type">object</span>
|
|
2634
|
+
</dt>
|
|
2635
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
2636
|
+
</dl>
|
|
2637
|
+
|
|
2638
|
+
<h2>Delete Thread</h2>
|
|
2639
|
+
<p>Delete a thread.</p>
|
|
2640
|
+
<dl class="message-properties">
|
|
705
2641
|
<h2>msg.payload Properties</h2>
|
|
706
|
-
|
|
707
|
-
<dt>
|
|
708
|
-
|
|
2642
|
+
|
|
2643
|
+
<dt>
|
|
2644
|
+
thread_id
|
|
2645
|
+
<a
|
|
2646
|
+
href="https://platform.openai.com/docs/api-reference/threads/deleteThread#threads-deletethread-thread_id"
|
|
2647
|
+
target="_blank"
|
|
2648
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
2649
|
+
></a>
|
|
2650
|
+
<span class="property-type">string</span>
|
|
2651
|
+
</dt>
|
|
2652
|
+
<dd>The ID of the thread to delete.</dd>
|
|
2653
|
+
</dl>
|
|
709
2654
|
</section>
|
|
2655
|
+
</section>
|
|
710
2656
|
</script>
|
|
711
2657
|
|
|
712
2658
|
<script type="text/javascript">
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
2659
|
+
RED.nodes.registerType("Service Host", {
|
|
2660
|
+
category: "config",
|
|
2661
|
+
defaults: {
|
|
2662
|
+
apiBase: { value: "https://api.openai.com/v1", required: true },
|
|
2663
|
+
secureApiKeyHeaderOrQueryName: { value: "Authorization" },
|
|
2664
|
+
organizationId: { value: "" },
|
|
2665
|
+
secureApiKeyIsQuery: { value: false },
|
|
2666
|
+
name: { value: "" },
|
|
2667
|
+
},
|
|
2668
|
+
credentials: {
|
|
2669
|
+
secureApiKeyValue: { type: "password" },
|
|
2670
|
+
temp: { type: "text" },
|
|
2671
|
+
},
|
|
2672
|
+
label: function () {
|
|
2673
|
+
return this.name || this.host;
|
|
2674
|
+
},
|
|
2675
|
+
labelStyle: function () {
|
|
2676
|
+
return this.name ? "node_label_italic" : "";
|
|
2677
|
+
},
|
|
2678
|
+
oneditprepare: function () {
|
|
2679
|
+
$("#node-config-input-secureApiKeyIsQuery-label").hide();
|
|
2680
|
+
$("#node-config-input-secureApiKeyIsQuery").hide();
|
|
2681
|
+
var selected = $(
|
|
2682
|
+
"#node-config-input-secureApiKeyIsQuery option:selected",
|
|
2683
|
+
);
|
|
2684
|
+
if (!selected.val()) {
|
|
2685
|
+
$("#node-config-input-secureApiKeyIsQuery").val(false);
|
|
2686
|
+
}
|
|
2687
|
+
},
|
|
2688
|
+
});
|
|
741
2689
|
</script>
|
|
742
2690
|
|
|
743
2691
|
<script type="text/html" data-template-name="Service Host">
|
|
2692
|
+
<div class="form-row">
|
|
2693
|
+
<label id="node-config-input-apiBase-label" for="node-config-input-apiBase"
|
|
2694
|
+
><i class="fa fa-list"></i>
|
|
2695
|
+
<span data-i18n="OpenaiApi.label.apiBase"></span
|
|
2696
|
+
></label>
|
|
2697
|
+
<input
|
|
2698
|
+
type="text"
|
|
2699
|
+
id="node-config-input-apiBase"
|
|
2700
|
+
placeholder="https://api.openai.com/v1"
|
|
2701
|
+
/>
|
|
2702
|
+
</div>
|
|
2703
|
+
<div class="form-row">
|
|
2704
|
+
<label
|
|
2705
|
+
id="node-config-input-secureApiKeyHeaderOrQueryName-label"
|
|
2706
|
+
for="node-config-input-secureApiKeyHeaderOrQueryName"
|
|
2707
|
+
><i class="fa fa-list"></i>
|
|
2708
|
+
<span data-i18n="OpenaiApi.label.header"></span
|
|
2709
|
+
></label>
|
|
2710
|
+
<input
|
|
2711
|
+
type="text"
|
|
2712
|
+
id="node-config-input-secureApiKeyHeaderOrQueryName"
|
|
2713
|
+
placeholder=""
|
|
2714
|
+
/>
|
|
2715
|
+
</div>
|
|
2716
|
+
<div class="form-row">
|
|
2717
|
+
<label
|
|
2718
|
+
id="node-config-input-secureApiKeyValue-label"
|
|
2719
|
+
for="node-config-input-secureApiKeyValue"
|
|
2720
|
+
><i class="fa fa-lock"></i>
|
|
2721
|
+
<span data-i18n="OpenaiApi.label.apiKey"></span
|
|
2722
|
+
></label>
|
|
2723
|
+
<input
|
|
2724
|
+
type="password"
|
|
2725
|
+
id="node-config-input-secureApiKeyValue"
|
|
2726
|
+
placeholder=""
|
|
2727
|
+
/>
|
|
2728
|
+
</div>
|
|
2729
|
+
<div class="form-row">
|
|
2730
|
+
<label
|
|
2731
|
+
id="node-config-input-organizationId-label"
|
|
2732
|
+
for="node-config-input-organizationId"
|
|
2733
|
+
><i class="fa fa-list"></i>
|
|
2734
|
+
<span data-i18n="OpenaiApi.label.organizationId"></span
|
|
2735
|
+
></label>
|
|
2736
|
+
<input
|
|
2737
|
+
type="text"
|
|
2738
|
+
id="node-config-input-organizationId"
|
|
2739
|
+
placeholder="OpenAI Organization Id"
|
|
2740
|
+
/>
|
|
2741
|
+
</div>
|
|
2742
|
+
<div class="form-row">
|
|
2743
|
+
<label
|
|
2744
|
+
id="node-config-input-secureApiKeyIsQuery-label"
|
|
2745
|
+
for="node-config-input-secureApiKeyIsQuery"
|
|
2746
|
+
><i class="fa fa-dot-circle-o"></i>
|
|
2747
|
+
<span data-i18n="OpenaiApi.label.isQuery"></span
|
|
2748
|
+
></label>
|
|
2749
|
+
<select id="node-config-input-secureApiKeyIsQuery">
|
|
2750
|
+
<option value="true">true</option>
|
|
2751
|
+
<option value="false">false</option>
|
|
2752
|
+
</select>
|
|
2753
|
+
</div>
|
|
744
2754
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
</div>
|
|
757
|
-
<div class="form-row">
|
|
758
|
-
<label id="node-config-input-organizationId-label" for="node-config-input-organizationId"><i class="fa fa-list"></i> <span data-i18n="OpenaiApi.label.organizationId"></span></label>
|
|
759
|
-
<input type="text" id="node-config-input-organizationId" placeholder="OpenAI Organization Id">
|
|
760
|
-
</div>
|
|
761
|
-
<div class="form-row">
|
|
762
|
-
<label id="node-config-input-secureApiKeyIsQuery-label" for="node-config-input-secureApiKeyIsQuery"><i class="fa fa-dot-circle-o"></i> <span data-i18n="OpenaiApi.label.isQuery"></span></label>
|
|
763
|
-
<select id="node-config-input-secureApiKeyIsQuery">
|
|
764
|
-
<option value="true">true</option>
|
|
765
|
-
<option value="false">false</option>
|
|
766
|
-
</select>
|
|
767
|
-
</div>
|
|
768
|
-
|
|
769
|
-
<div class="form-row">
|
|
770
|
-
<label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
|
771
|
-
<input type="text" id="node-config-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
772
|
-
</div>
|
|
2755
|
+
<div class="form-row">
|
|
2756
|
+
<label for="node-config-input-name"
|
|
2757
|
+
><i class="fa fa-tag"></i>
|
|
2758
|
+
<span data-i18n="node-red:common.label.name"></span
|
|
2759
|
+
></label>
|
|
2760
|
+
<input
|
|
2761
|
+
type="text"
|
|
2762
|
+
id="node-config-input-name"
|
|
2763
|
+
data-i18n="[placeholder]node-red:common.label.name"
|
|
2764
|
+
/>
|
|
2765
|
+
</div>
|
|
773
2766
|
</script>
|
|
774
2767
|
|
|
775
2768
|
<script type="text/html" data-help-name="Service Host">
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
</script>
|
|
2769
|
+
<p><b>Header</b>: Variable name to set API key</p>
|
|
2770
|
+
<p><b>Value</b>: Value of API key</p>
|
|
2771
|
+
</script>
|