@inductiv/node-red-openai-api 1.85.1 → 1.85.4
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 +3 -3
- package/lib.js +43 -0
- package/locales/de-DE/node.json +5 -0
- package/locales/en-US/node.json +5 -0
- package/locales/ja/node.json +5 -0
- package/locales/zh-CN/node.json +6 -1
- package/node.html +568 -303
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -40,10 +40,10 @@ After installation, find your node in the **AI** palette category labeled "OpenA
|
|
|
40
40
|
- **Configurable and Flexible**: Adapt to a wide range of project requirements, making it easy to integrate AI into your IoT solutions.
|
|
41
41
|
- **Powerful Combinations**: Utilize Node-RED's diverse nodes to build complex, AI-driven IoT workflows with ease.
|
|
42
42
|
|
|
43
|
-
## Release Notes (v1.85.
|
|
43
|
+
## Release Notes (v1.85.4)
|
|
44
44
|
|
|
45
|
-
- **Ehancement
|
|
46
|
-
-
|
|
45
|
+
- **Ehancement:** Upgraded the OpenAI API Library dependency from [v4.85.1](https://github.com/openai/openai-node/releases/tag/v4.85.1) to [v4.85.4](https://github.com/openai/openai-node/releases/tag/v4.85.4).
|
|
46
|
+
- **Enhancement:** Implemented [Chat Completion storage methods](https://platform.openai.com/docs/api-reference/chat).
|
|
47
47
|
|
|
48
48
|
## What's New in Version 1.x
|
|
49
49
|
|
package/lib.js
CHANGED
|
@@ -250,6 +250,49 @@ let OpenaiApi = (function () {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
async getChatCompletion(parameters) {
|
|
254
|
+
const openai = new OpenAI(this.clientParams);
|
|
255
|
+
const { completion_id, ...options } = parameters.payload;
|
|
256
|
+
|
|
257
|
+
const response = await openai.chat.completions.retrieve(completion_id, options);
|
|
258
|
+
|
|
259
|
+
return response;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
async getChatMessages(parameters) {
|
|
263
|
+
const openai = new OpenAI(this.clientParams);
|
|
264
|
+
const { completion_id, ...options } = parameters.payload;
|
|
265
|
+
|
|
266
|
+
const response = await openai.chat.completions.messages.list(completion_id, options);
|
|
267
|
+
|
|
268
|
+
return response.data;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async listChatCompletions(parameters) {
|
|
272
|
+
const openai = new OpenAI(this.clientParams);
|
|
273
|
+
const response = await openai.chat.completions.list(parameters.payload);
|
|
274
|
+
|
|
275
|
+
return response.data;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
async updateChatCompletion(parameters) {
|
|
279
|
+
const openai = new OpenAI(this.clientParams);
|
|
280
|
+
const { completion_id, ...body } = parameters.payload;
|
|
281
|
+
|
|
282
|
+
const response = await openai.chat.completions.update(completion_id, body);
|
|
283
|
+
|
|
284
|
+
return response;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
async deleteChatCompletion(parameters) {
|
|
288
|
+
const openai = new OpenAI(this.clientParams);
|
|
289
|
+
const { completion_id, ...options } = parameters.payload;
|
|
290
|
+
|
|
291
|
+
const response = await openai.chat.completions.del(completion_id, options);
|
|
292
|
+
|
|
293
|
+
return response;
|
|
294
|
+
}
|
|
295
|
+
|
|
253
296
|
async createImage(parameters) {
|
|
254
297
|
const openai = new OpenAI(this.clientParams);
|
|
255
298
|
const response = await openai.images.generate(parameters.payload);
|
package/locales/de-DE/node.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"cancelBatch": "cancel batch",
|
|
36
36
|
"listBatch": "list batch",
|
|
37
37
|
"createChatCompletion": "create chat completion",
|
|
38
|
+
"getChatCompletion": "get chat completion",
|
|
39
|
+
"getChatMessages": "get chat messages",
|
|
40
|
+
"listChatCompletions": "list chat completions",
|
|
41
|
+
"updateChatCompletion": "update chat completion",
|
|
42
|
+
"deleteChatCompletion": "delete chat completion",
|
|
38
43
|
"body": "body",
|
|
39
44
|
"request_body": "Request Body",
|
|
40
45
|
"data": "data",
|
package/locales/en-US/node.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"cancelBatch": "cancel batch",
|
|
36
36
|
"listBatch": "list batch",
|
|
37
37
|
"createChatCompletion": "create chat completion",
|
|
38
|
+
"getChatCompletion": "get chat completion",
|
|
39
|
+
"getChatMessages": "get chat messages",
|
|
40
|
+
"listChatCompletions": "list chat completions",
|
|
41
|
+
"updateChatCompletion": "update chat completion",
|
|
42
|
+
"deleteChatCompletion": "delete chat completion",
|
|
38
43
|
"body": "body",
|
|
39
44
|
"request_body": "Request Body",
|
|
40
45
|
"data": "data",
|
package/locales/ja/node.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"cancelBatch": "cancel batch",
|
|
36
36
|
"listBatch": "list batch",
|
|
37
37
|
"createChatCompletion": "create chat completion",
|
|
38
|
+
"getChatCompletion": "get chat completion",
|
|
39
|
+
"getChatMessages": "get chat messages",
|
|
40
|
+
"listChatCompletions": "list chat completions",
|
|
41
|
+
"updateChatCompletion": "update chat completion",
|
|
42
|
+
"deleteChatCompletion": "delete chat completion",
|
|
38
43
|
"body": "body",
|
|
39
44
|
"request_body": "Request Body",
|
|
40
45
|
"data": "data",
|
package/locales/zh-CN/node.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"cancelBatch": "cancel batch",
|
|
36
36
|
"listBatch": "list batch",
|
|
37
37
|
"createChatCompletion": "create chat completion",
|
|
38
|
+
"getChatCompletion": "get chat completion",
|
|
39
|
+
"getChatMessages": "get chat messages",
|
|
40
|
+
"listChatCompletions": "list chat completions",
|
|
41
|
+
"updateChatCompletion": "update chat completion",
|
|
42
|
+
"deleteChatCompletion": "delete chat completion",
|
|
38
43
|
"body": "body",
|
|
39
44
|
"request_body": "Request Body",
|
|
40
45
|
"data": "data",
|
|
@@ -112,9 +117,9 @@
|
|
|
112
117
|
"getMessage": "retrieve message",
|
|
113
118
|
"message_id": "message id",
|
|
114
119
|
"modifyMessage": "modify message",
|
|
115
|
-
"createSession": "create session",
|
|
116
120
|
"createUpload": "create upload",
|
|
117
121
|
"addUploadPart": "add upload part",
|
|
122
|
+
"completeUpload": "complete upload",
|
|
118
123
|
"cancelUpload": "cancel upload",
|
|
119
124
|
"createThreadAndRun": "create thread and run",
|
|
120
125
|
"listRuns": "list runs",
|
package/node.html
CHANGED
|
@@ -158,6 +158,30 @@
|
|
|
158
158
|
value="createChatCompletion"
|
|
159
159
|
data-i18n="OpenaiApi.parameters.createChatCompletion"
|
|
160
160
|
></option>
|
|
161
|
+
<option
|
|
162
|
+
value="getChatCompletion"
|
|
163
|
+
data-i18n="OpenaiApi.parameters.getChatCompletion"
|
|
164
|
+
></option>
|
|
165
|
+
<option
|
|
166
|
+
value="getChatMessages"
|
|
167
|
+
data-i18n="OpenaiApi.parameters.getChatMessages"
|
|
168
|
+
></option>
|
|
169
|
+
|
|
170
|
+
<option
|
|
171
|
+
value="listChatCompletions"
|
|
172
|
+
data-i18n="OpenaiApi.parameters.listChatCompletions"
|
|
173
|
+
></option>
|
|
174
|
+
|
|
175
|
+
<option
|
|
176
|
+
value="updateChatCompletion"
|
|
177
|
+
data-i18n="OpenaiApi.parameters.updateChatCompletion"
|
|
178
|
+
></option>
|
|
179
|
+
|
|
180
|
+
<option
|
|
181
|
+
value="deleteChatCompletion"
|
|
182
|
+
data-i18n="OpenaiApi.parameters.deleteChatCompletion"
|
|
183
|
+
></option>
|
|
184
|
+
|
|
161
185
|
</optgroup>
|
|
162
186
|
<optgroup style="font-style: normal;" label="🔗 Embeddings">
|
|
163
187
|
<option
|
|
@@ -1245,344 +1269,585 @@
|
|
|
1245
1269
|
|
|
1246
1270
|
<section>
|
|
1247
1271
|
<details>
|
|
1248
|
-
|
|
1272
|
+
<summary style="font-weight: bold;">🗨️ Chat</summary>
|
|
1273
|
+
<a
|
|
1274
|
+
href="https://platform.openai.com/docs/api-reference/chat"
|
|
1275
|
+
target="_blank"
|
|
1276
|
+
>Official Documentation
|
|
1277
|
+
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1278
|
+
></a>
|
|
1279
|
+
<h4 style="font-weight: bolder;"> ⋙ Create Chat Completion</h4>
|
|
1280
|
+
<p>
|
|
1281
|
+
Creates a model response for the given chat conversation.
|
|
1249
1282
|
<a
|
|
1250
|
-
href="https://platform.openai.com/docs/api-reference/chat"
|
|
1283
|
+
href="https://platform.openai.com/docs/api-reference/chat/create"
|
|
1251
1284
|
target="_blank"
|
|
1252
|
-
>
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
<
|
|
1257
|
-
|
|
1285
|
+
>Full documentation.</a
|
|
1286
|
+
>
|
|
1287
|
+
</p>
|
|
1288
|
+
<dl class="message-properties">
|
|
1289
|
+
<h4>msg.payload Properties</h4>
|
|
1290
|
+
|
|
1291
|
+
<dt>
|
|
1292
|
+
messages
|
|
1258
1293
|
<a
|
|
1259
|
-
href="https://platform.openai.com/docs/api-reference/chat/create"
|
|
1294
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages"
|
|
1260
1295
|
target="_blank"
|
|
1261
|
-
|
|
1262
|
-
>
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
<dd>A list of messages comprising the conversation so far.</dd>
|
|
1277
|
-
<dt>
|
|
1278
|
-
model
|
|
1279
|
-
<a
|
|
1280
|
-
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-model"
|
|
1281
|
-
target="_blank"
|
|
1282
|
-
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1283
|
-
></a>
|
|
1284
|
-
<span class="property-type">string</span>
|
|
1285
|
-
</dt>
|
|
1286
|
-
<dd>ID of the model to use.</dd>
|
|
1296
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1297
|
+
></a>
|
|
1298
|
+
<span class="property-type">array</span>
|
|
1299
|
+
</dt>
|
|
1300
|
+
<dd>A list of messages comprising the conversation so far.</dd>
|
|
1301
|
+
<dt>
|
|
1302
|
+
model
|
|
1303
|
+
<a
|
|
1304
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-model"
|
|
1305
|
+
target="_blank"
|
|
1306
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1307
|
+
></a>
|
|
1308
|
+
<span class="property-type">string</span>
|
|
1309
|
+
</dt>
|
|
1310
|
+
<dd>ID of the model to use.</dd>
|
|
1287
1311
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1312
|
+
<dt class="optional">
|
|
1313
|
+
store
|
|
1314
|
+
<a
|
|
1315
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-store"
|
|
1316
|
+
target="_blank"
|
|
1317
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1318
|
+
></a>
|
|
1319
|
+
<span class="property-type">boolean | null</span>
|
|
1320
|
+
</dt>
|
|
1321
|
+
<dd>Whether to store the output of this chat completion request.</dd>
|
|
1298
1322
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1323
|
+
<dt class="optional">
|
|
1324
|
+
reasoning_effort
|
|
1325
|
+
<a
|
|
1326
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-reasoning_effort"
|
|
1327
|
+
target="_blank"
|
|
1328
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1329
|
+
></a>
|
|
1330
|
+
<span class="property-type">string</span>
|
|
1331
|
+
</dt>
|
|
1332
|
+
<dd>Constrains effort on reasoning for reasoning models.</dd>
|
|
1309
1333
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1334
|
+
<dt class="optional">
|
|
1335
|
+
metadata
|
|
1336
|
+
<a
|
|
1337
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-metadata"
|
|
1338
|
+
target="_blank"
|
|
1339
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1340
|
+
></a>
|
|
1341
|
+
<span class="property-type">object or null</span>
|
|
1342
|
+
</dt>
|
|
1343
|
+
<dd>Developer-defined tags and values used for filtering completions in the dashboard.</dd>
|
|
1320
1344
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
<
|
|
1390
|
-
|
|
1391
|
-
|
|
1345
|
+
<dt class="optional">
|
|
1346
|
+
frequency_penalty
|
|
1347
|
+
<a
|
|
1348
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-frequency_penalty"
|
|
1349
|
+
target="_blank"
|
|
1350
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1351
|
+
></a>
|
|
1352
|
+
<span class="property-type">number</span>
|
|
1353
|
+
</dt>
|
|
1354
|
+
<dd>Number between -2.0 and 2.0.</dd>
|
|
1355
|
+
<dt class="optional">
|
|
1356
|
+
logit_bias
|
|
1357
|
+
<a
|
|
1358
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-logit_bias"
|
|
1359
|
+
target="_blank"
|
|
1360
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1361
|
+
></a>
|
|
1362
|
+
<span class="property-type">object</span>
|
|
1363
|
+
</dt>
|
|
1364
|
+
<dd>
|
|
1365
|
+
Modify the likelihood of specified tokens appearing in the completion.
|
|
1366
|
+
</dd>
|
|
1367
|
+
<dt class="optional">
|
|
1368
|
+
logprobs
|
|
1369
|
+
<a
|
|
1370
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-logprobs"
|
|
1371
|
+
target="_blank"
|
|
1372
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1373
|
+
></a>
|
|
1374
|
+
<span class="property-type">boolean</span>
|
|
1375
|
+
</dt>
|
|
1376
|
+
<dd>Whether to return log probabilities of the output tokens or not.</dd>
|
|
1377
|
+
<dt class="optional">
|
|
1378
|
+
top_logprobs
|
|
1379
|
+
<a
|
|
1380
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-top_logprobs"
|
|
1381
|
+
target="_blank"
|
|
1382
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1383
|
+
></a>
|
|
1384
|
+
<span class="property-type">integer</span>
|
|
1385
|
+
</dt>
|
|
1386
|
+
<dd>
|
|
1387
|
+
An integer between 0 and 5 specifying the number of most likely tokens
|
|
1388
|
+
to return at each token position, each with an associated log
|
|
1389
|
+
probability.
|
|
1390
|
+
</dd>
|
|
1391
|
+
<dt class="optional">
|
|
1392
|
+
max_tokens [Deprecated]
|
|
1393
|
+
<a
|
|
1394
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens"
|
|
1395
|
+
target="_blank"
|
|
1396
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1397
|
+
></a>
|
|
1398
|
+
<span class="property-type">integer</span>
|
|
1399
|
+
</dt>
|
|
1400
|
+
<dd>
|
|
1401
|
+
The maximum number of tokens that can be generated in the chat
|
|
1402
|
+
completion. This value is now deprecated in favor of max_completion_tokens,
|
|
1403
|
+
and is not compatible with o1 series models.
|
|
1404
|
+
</dd>
|
|
1405
|
+
|
|
1406
|
+
<dt class="optional">
|
|
1407
|
+
max_completion_tokens
|
|
1408
|
+
<a
|
|
1409
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_completion_tokens"
|
|
1410
|
+
target="_blank"
|
|
1411
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1412
|
+
></a>
|
|
1413
|
+
<span class="property-type">integer</span>
|
|
1414
|
+
</dt>
|
|
1415
|
+
<dd>
|
|
1416
|
+
An upper bound for the number of tokens that can be generated for a completion,
|
|
1417
|
+
including visible output tokens and reasoning tokens.
|
|
1418
|
+
</dd>
|
|
1419
|
+
|
|
1420
|
+
<dt class="optional">
|
|
1421
|
+
n
|
|
1422
|
+
<a
|
|
1423
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-n"
|
|
1424
|
+
target="_blank"
|
|
1425
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1426
|
+
></a>
|
|
1427
|
+
<span class="property-type">integer</span>
|
|
1428
|
+
</dt>
|
|
1429
|
+
<dd>
|
|
1430
|
+
How many chat completion choices to generate for each input message.
|
|
1431
|
+
</dd>
|
|
1392
1432
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1433
|
+
<dt class="optional">
|
|
1434
|
+
modalities
|
|
1435
|
+
<a
|
|
1436
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-modalities"
|
|
1437
|
+
target="_blank"
|
|
1438
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1439
|
+
></a>
|
|
1440
|
+
<span class="property-type">array or null</span>
|
|
1441
|
+
</dt>
|
|
1442
|
+
<dd>
|
|
1443
|
+
Output types that you would like the model to generate for this request.
|
|
1444
|
+
</dd>
|
|
1405
1445
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1446
|
+
<dt class="optional">
|
|
1447
|
+
prediction
|
|
1448
|
+
<a
|
|
1449
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-prediction"
|
|
1450
|
+
target="_blank"
|
|
1451
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1452
|
+
></a>
|
|
1453
|
+
<span class="property-type">object</span>
|
|
1454
|
+
</dt>
|
|
1455
|
+
<dd>
|
|
1456
|
+
Configuration for a Predicted Output.
|
|
1457
|
+
</dd>
|
|
1418
1458
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1459
|
+
<dt class="optional">
|
|
1460
|
+
audio
|
|
1461
|
+
<a
|
|
1462
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-audio"
|
|
1463
|
+
target="_blank"
|
|
1464
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1465
|
+
></a>
|
|
1466
|
+
<span class="property-type">object or null</span>
|
|
1467
|
+
</dt>
|
|
1468
|
+
<dd>
|
|
1469
|
+
Parameters for audio output.
|
|
1470
|
+
</dd>
|
|
1431
1471
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
<dt class="optional">
|
|
1443
|
-
response_format
|
|
1444
|
-
<a
|
|
1445
|
-
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format"
|
|
1446
|
-
target="_blank"
|
|
1447
|
-
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1448
|
-
></a>
|
|
1449
|
-
<span class="property-type">object</span>
|
|
1450
|
-
</dt>
|
|
1451
|
-
<dd>An object specifying the format that the model must output.</dd>
|
|
1452
|
-
<dt class="optional">
|
|
1453
|
-
seed
|
|
1454
|
-
<a
|
|
1455
|
-
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-seed"
|
|
1456
|
-
target="_blank"
|
|
1457
|
-
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1458
|
-
></a>
|
|
1459
|
-
<span class="property-type">integer</span>
|
|
1460
|
-
</dt>
|
|
1461
|
-
<dd>
|
|
1462
|
-
This feature is in Beta. If specified, the system will make a best
|
|
1463
|
-
effort to sample deterministically, such that repeated requests with the
|
|
1464
|
-
same seed and parameters should return the same result.
|
|
1465
|
-
</dd>
|
|
1472
|
+
<dt class="optional">
|
|
1473
|
+
presence_penalty
|
|
1474
|
+
<a
|
|
1475
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-presence_penalty"
|
|
1476
|
+
target="_blank"
|
|
1477
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1478
|
+
></a>
|
|
1479
|
+
<span class="property-type">number</span>
|
|
1480
|
+
</dt>
|
|
1481
|
+
<dd>Number between -2.0 and 2.0.</dd>
|
|
1466
1482
|
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
Specifies the latency tier to use for processing the request.
|
|
1478
|
-
</dd>
|
|
1483
|
+
<dt class="optional">
|
|
1484
|
+
response_format
|
|
1485
|
+
<a
|
|
1486
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format"
|
|
1487
|
+
target="_blank"
|
|
1488
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1489
|
+
></a>
|
|
1490
|
+
<span class="property-type">object</span>
|
|
1491
|
+
</dt>
|
|
1492
|
+
<dd>An object specifying the format that the model must output.</dd>
|
|
1479
1493
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
<a
|
|
1495
|
-
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream"
|
|
1496
|
-
target="_blank"
|
|
1497
|
-
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1498
|
-
></a>
|
|
1499
|
-
<span class="property-type">boolean</span>
|
|
1500
|
-
</dt>
|
|
1501
|
-
<dd>If set, partial message deltas will be sent, like in ChatGPT.</dd>
|
|
1494
|
+
<dt class="optional">
|
|
1495
|
+
seed
|
|
1496
|
+
<a
|
|
1497
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-seed"
|
|
1498
|
+
target="_blank"
|
|
1499
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1500
|
+
></a>
|
|
1501
|
+
<span class="property-type">integer</span>
|
|
1502
|
+
</dt>
|
|
1503
|
+
<dd>
|
|
1504
|
+
This feature is in Beta. If specified, the system will make a best
|
|
1505
|
+
effort to sample deterministically, such that repeated requests with the
|
|
1506
|
+
same seed and parameters should return the same result.
|
|
1507
|
+
</dd>
|
|
1502
1508
|
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1509
|
+
<dt class="optional">
|
|
1510
|
+
service_tier
|
|
1511
|
+
<a
|
|
1512
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-service_tier"
|
|
1513
|
+
target="_blank"
|
|
1514
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1515
|
+
></a>
|
|
1516
|
+
<span class="property-type">string or null</span>
|
|
1517
|
+
</dt>
|
|
1518
|
+
<dd>
|
|
1519
|
+
Specifies the latency tier to use for processing the request.
|
|
1520
|
+
</dd>
|
|
1513
1521
|
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1522
|
+
<dt class="optional">
|
|
1523
|
+
stop
|
|
1524
|
+
<a
|
|
1525
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-stop"
|
|
1526
|
+
target="_blank"
|
|
1527
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1528
|
+
></a>
|
|
1529
|
+
<span class="property-type">string | array</span>
|
|
1530
|
+
</dt>
|
|
1531
|
+
<dd>
|
|
1532
|
+
Up to 4 sequences where the API will stop generating further tokens.
|
|
1533
|
+
</dd>
|
|
1534
|
+
|
|
1535
|
+
<dt class="optional">
|
|
1536
|
+
stream
|
|
1537
|
+
<a
|
|
1538
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream"
|
|
1539
|
+
target="_blank"
|
|
1540
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1541
|
+
></a>
|
|
1542
|
+
<span class="property-type">boolean</span>
|
|
1543
|
+
</dt>
|
|
1544
|
+
<dd>If set, partial message deltas will be sent, like in ChatGPT.</dd>
|
|
1545
|
+
|
|
1546
|
+
<dt class="optional">
|
|
1547
|
+
stream_options
|
|
1548
|
+
<a
|
|
1549
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream_options"
|
|
1550
|
+
target="_blank"
|
|
1551
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1552
|
+
></a>
|
|
1553
|
+
<span class="property-type">object</span>
|
|
1554
|
+
</dt>
|
|
1555
|
+
<dd>Options for streaming response. Only set this when you set ```stream: true```.</dd>
|
|
1556
|
+
|
|
1557
|
+
<dt class="optional">
|
|
1558
|
+
temperature
|
|
1559
|
+
<a
|
|
1560
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature"
|
|
1561
|
+
target="_blank"
|
|
1562
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1563
|
+
></a>
|
|
1564
|
+
<span class="property-type">number</span>
|
|
1565
|
+
</dt>
|
|
1566
|
+
<dd>What sampling temperature to use, between 0 and 2.</dd>
|
|
1567
|
+
|
|
1568
|
+
<dt class="optional">
|
|
1569
|
+
top_p
|
|
1570
|
+
<a
|
|
1571
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-top_p"
|
|
1572
|
+
target="_blank"
|
|
1573
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1574
|
+
></a>
|
|
1575
|
+
<span class="property-type">number</span>
|
|
1576
|
+
</dt>
|
|
1577
|
+
<dd>
|
|
1578
|
+
An alternative to sampling with temperature, called nucleus sampling,
|
|
1579
|
+
where the model considers the results of the tokens with top_p
|
|
1580
|
+
probability mass.
|
|
1581
|
+
</dd>
|
|
1582
|
+
|
|
1583
|
+
<dt class="optional">
|
|
1584
|
+
tools
|
|
1585
|
+
<a
|
|
1586
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-tools"
|
|
1587
|
+
target="_blank"
|
|
1588
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1589
|
+
></a>
|
|
1590
|
+
<span class="property-type">array</span>
|
|
1591
|
+
</dt>
|
|
1592
|
+
<dd>A list of tools the model may call.</dd>
|
|
1593
|
+
|
|
1594
|
+
<dt class="optional">
|
|
1595
|
+
tool_choice
|
|
1596
|
+
<a
|
|
1597
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice"
|
|
1598
|
+
target="_blank"
|
|
1599
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1600
|
+
></a>
|
|
1601
|
+
<span class="property-type">string | object</span>
|
|
1602
|
+
</dt>
|
|
1603
|
+
<dd>Whether to enable parallel function calling during tool use.</dd>
|
|
1604
|
+
|
|
1605
|
+
<dt class="optional">
|
|
1606
|
+
parallel_tool_calls
|
|
1607
|
+
<a
|
|
1608
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-parallel_tool_calls"
|
|
1609
|
+
target="_blank"
|
|
1610
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1611
|
+
></a>
|
|
1612
|
+
<span class="property-type">string | object</span>
|
|
1613
|
+
</dt>
|
|
1614
|
+
<dd>Whether to enable parallel function calling during tool use.</dd>
|
|
1615
|
+
|
|
1616
|
+
<dt class="optional">
|
|
1617
|
+
user
|
|
1618
|
+
<a
|
|
1619
|
+
href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-user"
|
|
1620
|
+
target="_blank"
|
|
1621
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1622
|
+
></a>
|
|
1623
|
+
<span class="property-type">string</span>
|
|
1624
|
+
</dt>
|
|
1625
|
+
<dd>
|
|
1626
|
+
A unique identifier representing your end-user, which can help OpenAI to
|
|
1627
|
+
monitor and detect abuse.
|
|
1628
|
+
</dd>
|
|
1629
|
+
|
|
1630
|
+
</dl>
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
<h4 style="font-weight: bolder;"> ⋙ Get Chat Completion</h4>
|
|
1634
|
+
<p>
|
|
1635
|
+
Get a stored chat completion.
|
|
1636
|
+
<a
|
|
1637
|
+
href="https://platform.openai.com/docs/api-reference/chat/get"
|
|
1638
|
+
target="_blank"
|
|
1639
|
+
>Full documentation.</a
|
|
1640
|
+
>
|
|
1641
|
+
</p>
|
|
1642
|
+
<dl class="message-properties">
|
|
1643
|
+
<h4>msg.payload Properties</h4>
|
|
1644
|
+
|
|
1645
|
+
<dt>
|
|
1646
|
+
completion_id
|
|
1647
|
+
<a
|
|
1648
|
+
href="https://platform.openai.com/docs/api-reference/chat/get#chat-get-completion_id"
|
|
1649
|
+
target="_blank"
|
|
1650
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1651
|
+
></a>
|
|
1652
|
+
<span class="property-type">string</span>
|
|
1653
|
+
</dt>
|
|
1654
|
+
<dd>The ID of the chat completion to retrieve.</dd>
|
|
1655
|
+
</dl>
|
|
1656
|
+
|
|
1657
|
+
<!-- Begin Get Chat Messages -->
|
|
1658
|
+
<h4 style="font-weight: bolder;"> ⋙ Get Chat Messages</h4>
|
|
1659
|
+
<p>
|
|
1660
|
+
Get the messages in a stored chat completion.
|
|
1661
|
+
<a
|
|
1662
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages"
|
|
1663
|
+
target="_blank"
|
|
1664
|
+
>Full documentation.</a
|
|
1665
|
+
>
|
|
1666
|
+
</p>
|
|
1667
|
+
<dl class="message-properties">
|
|
1668
|
+
<h4>msg.payload Properties</h4>
|
|
1669
|
+
|
|
1670
|
+
<dt>
|
|
1671
|
+
completion_id
|
|
1672
|
+
<a
|
|
1673
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages#chat-getmessages-completion_id"
|
|
1674
|
+
target="_blank"
|
|
1675
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1676
|
+
></a>
|
|
1677
|
+
<span class="property-type">string</span>
|
|
1678
|
+
</dt>
|
|
1679
|
+
<dd>The ID of the chat completion to retrieve messages from.</dd>
|
|
1680
|
+
|
|
1681
|
+
<dt class="optional">
|
|
1682
|
+
after
|
|
1683
|
+
<a
|
|
1684
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages#chat-getmessages-afterf"
|
|
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>Identifier for the last message from the previous pagination request.</dd>
|
|
1691
|
+
|
|
1692
|
+
<dt class="optional">
|
|
1693
|
+
limit
|
|
1694
|
+
<a
|
|
1695
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages#chat-getmessages-limit"
|
|
1696
|
+
target="_blank"
|
|
1697
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1698
|
+
></a>
|
|
1699
|
+
<span class="property-type">integer</span>
|
|
1700
|
+
</dt>
|
|
1701
|
+
<dd>Number of messages to retrieve.</dd>
|
|
1702
|
+
|
|
1703
|
+
<dt class="optional">
|
|
1704
|
+
order
|
|
1705
|
+
<a
|
|
1706
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages#chat-getmessages-order"
|
|
1707
|
+
target="_blank"
|
|
1708
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1709
|
+
></a>
|
|
1710
|
+
<span class="property-type">string</span>
|
|
1711
|
+
</dt>
|
|
1712
|
+
<dd>Sort order for messages by timestamp.</dd>
|
|
1713
|
+
</dl>
|
|
1714
|
+
<!-- END Get Chat Messages -->
|
|
1715
|
+
|
|
1716
|
+
<!-- Begin List Chat Completions -->
|
|
1717
|
+
<dl>
|
|
1718
|
+
<h4 style="font-weight: bolder;"> ⋙ List Chat Completions</h4>
|
|
1719
|
+
<p>
|
|
1720
|
+
List stored chat completions.
|
|
1721
|
+
<a
|
|
1722
|
+
href="https://platform.openai.com/docs/api-reference/chat/list"
|
|
1723
|
+
target="_blank"
|
|
1724
|
+
>Full documentation.</a
|
|
1725
|
+
>
|
|
1726
|
+
</p>
|
|
1727
|
+
<dl class="message-properties">
|
|
1728
|
+
<h4>msg.payload Properties</h4>
|
|
1729
|
+
|
|
1730
|
+
<dt class="optional">
|
|
1731
|
+
model
|
|
1732
|
+
<a
|
|
1733
|
+
href="https://platform.openai.com/docs/api-reference/chat/list#chat-list-model"
|
|
1734
|
+
target="_blank"
|
|
1735
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1736
|
+
></a>
|
|
1737
|
+
<span class="property-type">string</span>
|
|
1738
|
+
</dt>
|
|
1739
|
+
<dd>The model used to generate the chat completions.</dd>
|
|
1740
|
+
|
|
1741
|
+
<dt class="optional">
|
|
1742
|
+
metadata
|
|
1743
|
+
<a
|
|
1744
|
+
href="https://platform.openai.com/docs/api-reference/chat/list#chat-list-metadata"
|
|
1745
|
+
target="_blank"
|
|
1746
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1747
|
+
></a>
|
|
1748
|
+
<span class="property-type">object</span>
|
|
1749
|
+
</dt>
|
|
1750
|
+
<dd>A list of metadata keys to filter the chat completions by.</dd>
|
|
1751
|
+
|
|
1752
|
+
<dt class="optional">
|
|
1753
|
+
after
|
|
1754
|
+
<a
|
|
1755
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages#chat-getmessages-limit"
|
|
1756
|
+
target="_blank"
|
|
1757
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1758
|
+
></a>
|
|
1759
|
+
<span class="property-type">string</span>
|
|
1760
|
+
</dt>
|
|
1761
|
+
<dd>Identifier for the last chat completion from the previous pagination request.</dd>
|
|
1762
|
+
|
|
1763
|
+
<dt class="optional">
|
|
1764
|
+
limit
|
|
1765
|
+
<a
|
|
1766
|
+
href="https://platform.openai.com/docs/api-reference/chat/list#chat-list-limit"
|
|
1767
|
+
target="_blank"
|
|
1768
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1769
|
+
></a>
|
|
1770
|
+
<span class="property-type">integer</span>
|
|
1771
|
+
</dt>
|
|
1772
|
+
<dd>Number of chat completions to retrieve.</dd>
|
|
1773
|
+
|
|
1774
|
+
<dt class="optional">
|
|
1775
|
+
order
|
|
1776
|
+
<a
|
|
1777
|
+
href="https://platform.openai.com/docs/api-reference/chat/list#chat-list-order"
|
|
1778
|
+
target="_blank"
|
|
1779
|
+
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1780
|
+
></a>
|
|
1781
|
+
<span class="property-type">string</span>
|
|
1782
|
+
</dt>
|
|
1783
|
+
<dd>Sort order for chat completions by timestamp.</dd>
|
|
1784
|
+
</dl>
|
|
1785
|
+
<!-- END List Chat Completions -->
|
|
1786
|
+
|
|
1787
|
+
<!-- Begin Update Chat Completions -->
|
|
1788
|
+
<dl>
|
|
1789
|
+
<h4 style="font-weight: bolder;"> ⋙ Update Chat Completion</h4>
|
|
1790
|
+
<p>
|
|
1791
|
+
Modify a stored chat completion.
|
|
1792
|
+
<a
|
|
1793
|
+
href="https://platform.openai.com/docs/api-reference/chat/update"
|
|
1794
|
+
target="_blank"
|
|
1795
|
+
>Full documentation.</a
|
|
1796
|
+
>
|
|
1797
|
+
</p>
|
|
1798
|
+
<dl class="message-properties">
|
|
1799
|
+
<h4>msg.payload Properties</h4>
|
|
1800
|
+
|
|
1801
|
+
<dt>
|
|
1802
|
+
completion_id
|
|
1550
1803
|
<a
|
|
1551
|
-
href="https://platform.openai.com/docs/api-reference/chat/
|
|
1804
|
+
href="https://platform.openai.com/docs/api-reference/chat/update#chat-update-completion_id"
|
|
1552
1805
|
target="_blank"
|
|
1553
1806
|
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1554
1807
|
></a>
|
|
1555
|
-
<span class="property-type">string
|
|
1808
|
+
<span class="property-type">string</span>
|
|
1556
1809
|
</dt>
|
|
1557
|
-
<dd>
|
|
1810
|
+
<dd>The ID of the chat completion to update.</dd>
|
|
1558
1811
|
|
|
1559
|
-
<dt
|
|
1560
|
-
|
|
1812
|
+
<dt>
|
|
1813
|
+
metadata
|
|
1561
1814
|
<a
|
|
1562
|
-
href="https://platform.openai.com/docs/api-reference/chat/
|
|
1815
|
+
href="https://platform.openai.com/docs/api-reference/chat/getMessages#chat-getmessages-limit"
|
|
1563
1816
|
target="_blank"
|
|
1564
1817
|
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1565
1818
|
></a>
|
|
1566
|
-
<span class="property-type">
|
|
1819
|
+
<span class="property-type">object</span>
|
|
1567
1820
|
</dt>
|
|
1568
|
-
<dd>
|
|
1821
|
+
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
1822
|
+
</dl>
|
|
1823
|
+
<!-- END Update Chat Completion -->
|
|
1569
1824
|
|
|
1570
|
-
|
|
1571
|
-
|
|
1825
|
+
<!-- Begin Delete Chat Completion -->
|
|
1826
|
+
<dl>
|
|
1827
|
+
<h4 style="font-weight: bolder;"> ⋙ Delete Chat Completion</h4>
|
|
1828
|
+
<p>
|
|
1829
|
+
Delete a stored chat completion.
|
|
1830
|
+
<a
|
|
1831
|
+
href="https://platform.openai.com/docs/api-reference/chat/delete"
|
|
1832
|
+
target="_blank"
|
|
1833
|
+
>Full documentation.</a
|
|
1834
|
+
>
|
|
1835
|
+
</p>
|
|
1836
|
+
<dl class="message-properties">
|
|
1837
|
+
<h4>msg.payload Properties</h4>
|
|
1838
|
+
|
|
1839
|
+
<dt>
|
|
1840
|
+
completion_id
|
|
1572
1841
|
<a
|
|
1573
|
-
href="https://platform.openai.com/docs/api-reference/chat/
|
|
1842
|
+
href="https://platform.openai.com/docs/api-reference/chat/delete#chat-delete-completion_id"
|
|
1574
1843
|
target="_blank"
|
|
1575
1844
|
><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
|
|
1576
1845
|
></a>
|
|
1577
1846
|
<span class="property-type">string</span>
|
|
1578
1847
|
</dt>
|
|
1579
|
-
<dd>
|
|
1580
|
-
A unique identifier representing your end-user, which can help OpenAI to
|
|
1581
|
-
monitor and detect abuse.
|
|
1582
|
-
</dd>
|
|
1583
|
-
|
|
1848
|
+
<dd>The ID of the chat completion to delete.</dd>
|
|
1584
1849
|
</dl>
|
|
1585
|
-
|
|
1850
|
+
<!-- END Delete Chat Completion -->
|
|
1586
1851
|
</details>
|
|
1587
1852
|
</section>
|
|
1588
1853
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inductiv/node-red-openai-api",
|
|
3
|
-
"version": "1.85.
|
|
3
|
+
"version": "1.85.4",
|
|
4
4
|
"description": "Enhance your Node-RED projects with advanced AI capabilities.",
|
|
5
5
|
"main": "node.js",
|
|
6
6
|
"engines": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"low-code"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"openai": "~4.85.
|
|
33
|
+
"openai": "~4.85.4"
|
|
34
34
|
},
|
|
35
35
|
"author": "Allan Bunch",
|
|
36
36
|
"license": "MIT",
|