@inductiv/node-red-openai-api 0.7.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/node.html CHANGED
@@ -1,3 +1,5 @@
1
+ <!--TODO: Implement Batch API endpoints: https://github.com/openai/openai-node/blob/6f72e7ad3e4e151c9334f4449d1c3555255c2793/CHANGELOG.md#features-2 -->
2
+
1
3
  <script type="text/javascript">
2
4
  RED.nodes.registerType("OpenAI API", {
3
5
  category: "AI",
@@ -34,7 +36,7 @@
34
36
  $("#node-input-property").typedInput({
35
37
  default: "msg",
36
38
  value: "payload",
37
- types:["msg", "flow", "global"],
39
+ types: ["msg", "flow", "global"],
38
40
  typeField: "#node-input-propertyType"
39
41
  })
40
42
  }
@@ -130,6 +132,27 @@
130
132
  data-i18n="OpenaiApi.parameters.createTranslation"
131
133
  ></option>
132
134
  </optgroup>
135
+
136
+ <!-- Batch Endpoint-->
137
+ <optgroup style="font-style: normal;" label="📦 Batch">
138
+ <option
139
+ value="createBatch"
140
+ data-i18n="OpenaiApi.parameters.createBatch"
141
+ ></option>
142
+ <option
143
+ value="retrieveBatch"
144
+ data-i18n="OpenaiApi.parameters.retrieveBatch"
145
+ ></option>
146
+ <option
147
+ value="cancelBatch"
148
+ data-i18n="OpenaiApi.parameters.cancelBatch"
149
+ ></option>
150
+ <option
151
+ value="listBatch"
152
+ data-i18n="OpenaiApi.parameters.listBatch"
153
+ ></option>
154
+ </optgroup>
155
+
133
156
  <optgroup style="font-style: normal;" label="🗨️ Chat">
134
157
  <option
135
158
  value="createChatCompletion"
@@ -217,14 +240,6 @@
217
240
  value="modifyMessage"
218
241
  data-i18n="OpenaiApi.parameters.modifyMessage"
219
242
  ></option>
220
- <option
221
- value="listMessageFiles"
222
- data-i18n="OpenaiApi.parameters.listMessageFiles"
223
- ></option>
224
- <option
225
- value="getMessageFile"
226
- data-i18n="OpenaiApi.parameters.getMessageFile"
227
- ></option>
228
243
  </optgroup>
229
244
  <optgroup style="font-style: normal;" label="🧠 Models">
230
245
  <option
@@ -265,8 +280,8 @@
265
280
  data-i18n="OpenaiApi.parameters.modifyRun"
266
281
  ></option>
267
282
  <option
268
- value="submitToolOuputsToRun"
269
- data-i18n="OpenaiApi.parameters.submitToolOuputsToRun"
283
+ value="submitToolOutputsToRun"
284
+ data-i18n="OpenaiApi.parameters.submitToolOutputsToRun"
270
285
  ></option>
271
286
  <option
272
287
  value="cancelRun"
@@ -299,6 +314,67 @@
299
314
  data-i18n="OpenaiApi.parameters.deleteThread"
300
315
  ></option>
301
316
  </optgroup>
317
+
318
+ <optgroup style="font-style: normal;" label="🔢 Vector Stores (Beta)">
319
+ <option
320
+ value="createVectorStore"
321
+ data-i18n="OpenaiApi.parameters.createVectorStore"
322
+ ></option>
323
+ <option
324
+ value="listVectorStores"
325
+ data-i18n="OpenaiApi.parameters.listVectorStores"
326
+ ></option>
327
+ <option
328
+ value="retrieveVectorStore"
329
+ data-i18n="OpenaiApi.parameters.retrieveVectorStore"
330
+ ></option>
331
+ <option
332
+ value="modifyVectorStore"
333
+ data-i18n="OpenaiApi.parameters.modifyVectorStore"
334
+ ></option>
335
+ <option
336
+ value="deleteVectorStore"
337
+ data-i18n="OpenaiApi.parameters.deleteVectorStore"
338
+ ></option>
339
+ </optgroup>
340
+
341
+ <optgroup style="font-style: normal;" label="🗃️ Vector Store Files (Beta)">
342
+ <option
343
+ value="createVectorStoreFile"
344
+ data-i18n="OpenaiApi.parameters.createVectorStoreFile"
345
+ ></option>
346
+ <option
347
+ value="listVectorStoreFiles"
348
+ data-i18n="OpenaiApi.parameters.listVectorStoreFiles"
349
+ ></option>
350
+ <option
351
+ value="retrieveVectorStoreFile"
352
+ data-i18n="OpenaiApi.parameters.retrieveVectorStoreFile"
353
+ ></option>
354
+ <option
355
+ value="deleteVectorStoreFile"
356
+ data-i18n="OpenaiApi.parameters.deleteVectorStoreFile"
357
+ ></option>
358
+ </optgroup>
359
+
360
+ <optgroup style="font-style: normal;" label="🗄️ Vector Store File Batches (Beta)">
361
+ <option
362
+ value="createVectorStoreFileBatch"
363
+ data-i18n="OpenaiApi.parameters.createVectorStoreFileBatch"
364
+ ></option>
365
+ <option
366
+ value="retrieveVectorStoreFileBatch"
367
+ data-i18n="OpenaiApi.parameters.retrieveVectorStoreFileBatch"
368
+ ></option>
369
+ <option
370
+ value="cancelVectorStoreFileBatch"
371
+ data-i18n="OpenaiApi.parameters.cancelVectorStoreFileBatch"
372
+ ></option>
373
+ <option
374
+ value="listVectorStoreBatchFiles"
375
+ data-i18n="OpenaiApi.parameters.listVectorStoreBatchFiles"
376
+ ></option>
377
+ </optgroup>
302
378
  </select>
303
379
  </div>
304
380
  </script>
@@ -376,16 +452,18 @@
376
452
  <span class="property-type">array</span>
377
453
  </dt>
378
454
  <dd>A list of tool enabled on the assistant.</dd>
455
+
379
456
  <dt class="optional">
380
- file_ids
457
+ tool_resources
381
458
  <a
382
- href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-file_ids"
459
+ href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-tool_resources"
383
460
  target="_blank"
384
461
  ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
385
462
  ></a>
386
- <span class="property-type">array</span>
463
+ <span class="property-type">object</span>
387
464
  </dt>
388
- <dd>A list of file IDs attached to this assistant.</dd>
465
+ <dd>A set of resources that are used by the assistant's tools. </dd>
466
+
389
467
  <dt class="optional">
390
468
  metadata
391
469
  <a
@@ -396,6 +474,40 @@
396
474
  <span class="property-type">object</span>
397
475
  </dt>
398
476
  <dd>Set of 16 key-value pairs that can be attached to an object.</dd>
477
+
478
+ <dt class="optional">
479
+ temperature
480
+ <a
481
+ href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-temperature"
482
+ target="_blank"
483
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
484
+ ></a>
485
+ <span class="property-type">number</span>
486
+ </dt>
487
+ <dd>What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.</dd>
488
+
489
+ <dt class="optional">
490
+ top_p
491
+ <a
492
+ href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-top_p"
493
+ target="_blank"
494
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
495
+ ></a>
496
+ <span class="property-type">number</span>
497
+ </dt>
498
+ <dd>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.</dd>
499
+
500
+ <dt class="optional">
501
+ response_format
502
+ <a
503
+ href="https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-response_format"
504
+ target="_blank"
505
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
506
+ ></a>
507
+ <span class="property-type">string</span>
508
+ </dt>
509
+ <dd>Specifies the format that the model must output.</dd>
510
+
399
511
  </dl>
400
512
 
401
513
  <h2>Retrieve Assistant</h2>
@@ -429,7 +541,8 @@
429
541
  ></a>
430
542
  <span class="property-type">string</span>
431
543
  </dt>
432
- <dd>The ID of the assistant to modify.</dd>
544
+ <dd>The ID of the assistant to retrieve.</dd>
545
+
433
546
  <dt class="optional">
434
547
  model
435
548
  <a
@@ -480,16 +593,18 @@
480
593
  <span class="property-type">array</span>
481
594
  </dt>
482
595
  <dd>A list of tool enabled on the assistant.</dd>
596
+
483
597
  <dt class="optional">
484
- file_ids
598
+ tool_resources
485
599
  <a
486
- href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-file_ids"
600
+ href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-tool_resources"
487
601
  target="_blank"
488
602
  ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
489
603
  ></a>
490
- <span class="property-type">array</span>
604
+ <span class="property-type">object</span>
491
605
  </dt>
492
- <dd>A list of File IDs attached to this assistant.</dd>
606
+ <dd>A set of resources that are used by the assistant's tools. </dd>
607
+
493
608
  <dt class="optional">
494
609
  metadata
495
610
  <a
@@ -500,6 +615,40 @@
500
615
  <span class="property-type">object</span>
501
616
  </dt>
502
617
  <dd>Set of 16 key-value pairs that can be attached to an object.</dd>
618
+
619
+ <dt class="optional">
620
+ temperature
621
+ <a
622
+ href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-temperature"
623
+ target="_blank"
624
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
625
+ ></a>
626
+ <span class="property-type">number</span>
627
+ </dt>
628
+ <dd>What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.</dd>
629
+
630
+ <dt class="optional">
631
+ top_p
632
+ <a
633
+ href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-top_p"
634
+ target="_blank"
635
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
636
+ ></a>
637
+ <span class="property-type">number</span>
638
+ </dt>
639
+ <dd>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.</dd>
640
+
641
+ <dt class="optional">
642
+ response_format
643
+ <a
644
+ href="https://platform.openai.com/docs/api-reference/assistants/modifyAssistant#assistants-modifyassistant-response_format"
645
+ target="_blank"
646
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
647
+ ></a>
648
+ <span class="property-type">string</span>
649
+ </dt>
650
+ <dd>Specifies the format that the model must output.</dd>
651
+
503
652
  </dl>
504
653
 
505
654
  <h2>Delete Assistant</h2>
@@ -762,7 +911,7 @@
762
911
  <span class="property-type">string</span>
763
912
  </dt>
764
913
  <dd>
765
- The format to audio in. Supported formats are mp3, opus, aac, and flac.
914
+ The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.
766
915
  </dd>
767
916
  <dt class="optional">
768
917
  speed
@@ -852,6 +1001,17 @@
852
1001
  <span class="property-type">number</span>
853
1002
  </dt>
854
1003
  <dd>The sampling temperature, between 0 and 1.</dd>
1004
+
1005
+ <dt class="optional">
1006
+ timestamp_granularities
1007
+ <a
1008
+ href="https://platform.openai.com/docs/api-reference/audio/createTranscription#audio-createtranscription-timestamp_granularities"
1009
+ target="_blank"
1010
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1011
+ ></a>
1012
+ <span class="property-type">array</span>
1013
+ </dt>
1014
+ <dd>The timestamp granularities to populate for this transcription. <code>response_format</code> must be set to <code>verbose_json</code> to use timestamp granularities. Either or both of these options are supported: <code>word</code>, or <code>segment</code>.</dd>
855
1015
  </dl>
856
1016
 
857
1017
  <h2>Create Translation</h2>
@@ -920,6 +1080,129 @@
920
1080
  </dl>
921
1081
  </section>
922
1082
 
1083
+ <!-- Begin Batch Endpoint Documentation-->
1084
+ <section>
1085
+ <h1 style="font-weight: bold;">📦 Batch</h1>
1086
+ <a
1087
+ href="https://platform.openai.com/docs/api-reference/batch"
1088
+ target="_blank"
1089
+ >Official Documentation
1090
+ <i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1091
+ ></a>
1092
+ <h2>Create Batch</h2>
1093
+ <p>Creates and executes a batch from an uploaded file of requests.</p>
1094
+ <dl class="message-properties">
1095
+ <h2>msg.payload Properties</h2>
1096
+
1097
+ <dt>
1098
+ input_file_id
1099
+ <a
1100
+ href="https://platform.openai.com/docs/api-reference/batch/create#batch-create-input_file_id"
1101
+ target="_blank"
1102
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1103
+ ></a>
1104
+ <span class="property-type">string</span>
1105
+ </dt>
1106
+ <dd>The ID of an uploaded file that contains requests for the new batch.</dd>
1107
+ <dt>
1108
+ endpoint
1109
+ <a
1110
+ href="https://platform.openai.com/docs/api-reference/batch/create#batch-create-endpoint"
1111
+ target="_blank"
1112
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1113
+ ></a>
1114
+ <span class="property-type">string</span>
1115
+ </dt>
1116
+ <dd>The endpoint to be used for all requests in the batch. Currently only /v1/chat/completions is supported.</dd>
1117
+ <dt>
1118
+ completion_window
1119
+ <a
1120
+ href="https://platform.openai.com/docs/api-reference/batch/create#batch-create-completion_window"
1121
+ target="_blank"
1122
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1123
+ ></a>
1124
+ <span class="property-type">string</span>
1125
+ </dt>
1126
+ <dd>
1127
+ The time frame within which the batch should be processed. Currently only 24h is supported.
1128
+ </dd>
1129
+ <dt class="optional">
1130
+ metadata
1131
+ <a
1132
+ href="https://platform.openai.com/docs/api-reference/batch/create#batch-create-metadata"
1133
+ target="_blank"
1134
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1135
+ ></a>
1136
+ <span class="property-type">string</span>
1137
+ </dt>
1138
+ <dd>
1139
+ Optional custom metadata for the batch.
1140
+ </dd>
1141
+ </dl>
1142
+
1143
+ <h2>Retrieve Batch</h2>
1144
+ <p>Retrieves a batch.</p>
1145
+ <dl class="message-properties">
1146
+ <h2>msg.payload Properties</h2>
1147
+
1148
+ <dt>
1149
+ batch_id
1150
+ <a
1151
+ href="https://platform.openai.com/docs/api-reference/batch/retrieve#batch-retrieve-batch_id"
1152
+ target="_blank"
1153
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1154
+ ></a>
1155
+ <span class="property-type">string</span>
1156
+ </dt>
1157
+ <dd>The ID of the batch to retrieve.</dd>
1158
+ </dl>
1159
+
1160
+ <h2>Cancel Batch</h2>
1161
+ <p>Cancels an in-progress batch.</p>
1162
+ <dl class="message-properties">
1163
+ <h2>msg.payload Properties</h2>
1164
+ <dt>
1165
+ batch_id
1166
+ <a
1167
+ href="https://platform.openai.com/docs/api-reference/batch/cancel#batch-cancel-batch_id"
1168
+ target="_blank"
1169
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1170
+ ></a>
1171
+ <span class="property-type">string</span>
1172
+ </dt>
1173
+ <dd>The ID of the batch to cancel.</dd>
1174
+ </dl>
1175
+
1176
+ <h2>List Batch</h2>
1177
+ <p>List your organization's batches.</p>
1178
+ <dl class="message-properties">
1179
+ <h2>msg.payload Properties</h2>
1180
+ <dt class="optional">
1181
+ after
1182
+ <a
1183
+ href="https://platform.openai.com/docs/api-reference/batch/list#batch-list-after"
1184
+ target="_blank"
1185
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1186
+ ></a>
1187
+ <span class="property-type">string</span>
1188
+ </dt>
1189
+ <dd>A cursor for use in pagination. after is an object ID that defines your place in the list.</dd>
1190
+
1191
+ <dt class="optional">
1192
+ limit
1193
+ <a
1194
+ href="https://platform.openai.com/docs/api-reference/batch/list#batch-list-limit"
1195
+ target="_blank"
1196
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1197
+ ></a>
1198
+ <span class="property-type">integer</span>
1199
+ </dt>
1200
+ <dd>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</dd>
1201
+ </dl>
1202
+
1203
+ </section>
1204
+ <!-- End Batch Endpoitn Documentation -->
1205
+
923
1206
  <section>
924
1207
  <h1 style="font-weight: bold;">🗨️ Chat</h1>
925
1208
  <a
@@ -1386,6 +1669,29 @@
1386
1669
  <span class="property-type">string</span>
1387
1670
  </dt>
1388
1671
  <dd>The ID of an uploaded file that contains validation data.</dd>
1672
+
1673
+ <dt class="optional">
1674
+ integrations
1675
+ <a
1676
+ href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-integrations"
1677
+ target="_blank"
1678
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1679
+ ></a>
1680
+ <span class="property-type">array</span>
1681
+ </dt>
1682
+ <dd>A list of integrations to enable for your fine-tuning job.</dd>
1683
+
1684
+ <dt class="optional">
1685
+ seed
1686
+ <a
1687
+ href="https://platform.openai.com/docs/api-reference/fine-tuning/create#fine-tuning-create-seed"
1688
+ target="_blank"
1689
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1690
+ ></a>
1691
+ <span class="property-type">array</span>
1692
+ </dt>
1693
+ <dd>The seed controls the reproducibility of the job.</dd>
1694
+
1389
1695
  </dl>
1390
1696
 
1391
1697
  <h2>List Fine-tuning Jobs</h2>
@@ -1831,6 +2137,18 @@
1831
2137
  <span class="property-type">string</span>
1832
2138
  </dt>
1833
2139
  <dd>A cursor for use in pagination.</dd>
2140
+
2141
+ <dt class="optional">
2142
+ run_id
2143
+ <a
2144
+ href="https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-run_id"
2145
+ target="_blank"
2146
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2147
+ ></a>
2148
+ <span class="property-type">string</span>
2149
+ </dt>
2150
+ <dd>Filter messages by the run ID that generated them.</dd>
2151
+
1834
2152
  </dl>
1835
2153
 
1836
2154
  <h3>Create Message</h3>
@@ -1954,110 +2272,7 @@
1954
2272
  <dd>Set of 16 key-value pairs that can be attached to an object.</dd>
1955
2273
  </dl>
1956
2274
 
1957
- <h3>List Message Files</h3>
1958
- <p>Returns a list of message files.</p>
1959
- <dl class="message-properties">
1960
- <h2>msg.payload Properties</h2>
1961
-
1962
- <dt>
1963
- thread_id
1964
- <a
1965
- href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-thread_id"
1966
- target="_blank"
1967
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1968
- ></a>
1969
- <span class="property-type">string</span>
1970
- </dt>
1971
- <dd>The ID of the thread that the message and files belong to.</dd>
1972
- <dt>
1973
- message_id
1974
- <a
1975
- href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-message_id"
1976
- target="_blank"
1977
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1978
- ></a>
1979
- <span class="property-type">string</span>
1980
- </dt>
1981
- <dd>The ID of the message that the files belongs to.</dd>
1982
- <dt class="optional">
1983
- limit
1984
- <a
1985
- href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-limit"
1986
- target="_blank"
1987
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1988
- ></a>
1989
- <span class="property-type">integer</span>
1990
- </dt>
1991
- <dd>A limit on the number of objects to be returned.</dd>
1992
- <dt class="optional">
1993
- order
1994
- <a
1995
- href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-order"
1996
- target="_blank"
1997
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
1998
- ></a>
1999
- <span class="property-type">string</span>
2000
- </dt>
2001
- <dd>Sort order by the created_at timestamp of the objects.</dd>
2002
- <dt class="optional">
2003
- after
2004
- <a
2005
- href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-after"
2006
- target="_blank"
2007
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2008
- ></a>
2009
- <span class="property-type">string</span>
2010
- </dt>
2011
- <dd>A cursor for use in pagination.</dd>
2012
- <dt class="optional">
2013
- before
2014
- <a
2015
- href="https://platform.openai.com/docs/api-reference/messages/listMessageFiles#messages-listmessagefiles-before"
2016
- target="_blank"
2017
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2018
- ></a>
2019
- <span class="property-type">string</span>
2020
- </dt>
2021
- <dd>A cursor for use in pagination.</dd>
2022
- </dl>
2023
-
2024
- <h3>Retrieve Message File</h3>
2025
- <p>Retrieves a message file.</p>
2026
- <dl class="message-properties">
2027
- <h2>msg.payload Properties</h2>
2028
-
2029
- <dt>
2030
- thread_id
2031
- <a
2032
- href="https://platform.openai.com/docs/api-reference/messages/getMessageFile#messages-getmessagefile-thread_id"
2033
- target="_blank"
2034
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2035
- ></a>
2036
- <span class="property-type">string</span>
2037
- </dt>
2038
- <dd>The ID of the thread to which the message and File belong.</dd>
2039
- <dt>
2040
- message_id
2041
- <a
2042
- href="https://platform.openai.com/docs/api-reference/messages/getMessageFile#messages-getmessagefile-message_id"
2043
- target="_blank"
2044
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2045
- ></a>
2046
- <span class="property-type">string</span>
2047
- </dt>
2048
- <dd>The ID of the message the file belongs to.</dd>
2049
- <dt>
2050
- file_id
2051
- <a
2052
- href="https://platform.openai.com/docs/api-reference/messages/getMessageFile#messages-getmessagefile-file_id"
2053
- target="_blank"
2054
- ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2055
- ></a>
2056
- <span class="property-type">string</span>
2057
- </dt>
2058
- <dd>The ID of the file being retrieved.</dd>
2059
- </dl>
2060
- </section>
2275
+ </section>
2061
2276
 
2062
2277
  <section>
2063
2278
  <h1 style="font-weight: bold;">🧠 Models</h1>
@@ -2224,6 +2439,90 @@
2224
2439
  <span class="property-type">object</span>
2225
2440
  </dt>
2226
2441
  <dd>Set of 16 key-value pairs that can be attached to an object.</dd>
2442
+
2443
+
2444
+ <dt class="optional">
2445
+ temperature
2446
+ <a
2447
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-temperature"
2448
+ target="_blank"
2449
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2450
+ ></a>
2451
+ <span class="property-type">number</span>
2452
+ </dt>
2453
+ <dd>What sampling temperature to use, between 0 and 2.</dd>
2454
+
2455
+ <dt class="optional">
2456
+ stream
2457
+ <a
2458
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-stream"
2459
+ target="_blank"
2460
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2461
+ ></a>
2462
+ <span class="property-type">boolean</span>
2463
+ </dt>
2464
+ <dd>If <code>true</code>, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a <code>data: [DONE]</code> message.</dd>
2465
+
2466
+ <dt class="optional">
2467
+ max_prompt_tokens
2468
+ <a
2469
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-max_prompt_tokens"
2470
+ target="_blank"
2471
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2472
+ ></a>
2473
+ <span class="property-type">integer</span>
2474
+ </dt>
2475
+ <dd>The maximum number of prompt tokens that may be used over the course of the run.</dd>
2476
+
2477
+ <dt class="optional">
2478
+ max_completion_tokens
2479
+ <a
2480
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-max_completion_tokens"
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>The maximum number of completion tokens that may be used over the course of the run.</dd>
2487
+
2488
+ <dt class="optional">
2489
+ truncation_strategy
2490
+ <a
2491
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-truncation_strategy"
2492
+ target="_blank"
2493
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2494
+ ></a>
2495
+ <span class="property-type">object</span>
2496
+ <dd>
2497
+ <strong><code>@property {string} type</code></strong> - The truncation strategy to use for the thread. The default is <code>auto</code>. If set to <code>last_messages</code>, the thread will be truncated to the n most recent messages in the thread. When set to <code>auto</code>, messages in the middle of the thread will be dropped to fit the context length of the model, <code>max_prompt_tokens</code>.
2498
+ </dd>
2499
+ <dd>
2500
+ <strong><code>@property {integer} [last_messages]</code></strong> - The number of most recent messages from the thread when constructing the context for the run.
2501
+ </dd>
2502
+ </dt>
2503
+
2504
+ <dt class="optional">
2505
+ tool_choice
2506
+ <a
2507
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-tool_choice"
2508
+ target="_blank"
2509
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2510
+ ></a>
2511
+ <span class="property-type">string | object</span>
2512
+ </dt>
2513
+ <dd>Controls which (if any) tool is called by the model. <code>none</code> means the model will not call any tools and instead generates a message. <code>auto</code> is the default value and means the model can pick between generating a message or calling a tool. Specifying a particular tool like <code>{"type": "TOOL_TYPE"}</code> forces the model to call that tool.</dd>
2514
+
2515
+ <dt class="optional">
2516
+ response_format
2517
+ <a
2518
+ href="https://platform.openai.com/docs/api-reference/runs/createThreadAndRun#runs-createthreadandrun-response_format"
2519
+ target="_blank"
2520
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2521
+ ></a>
2522
+ <span class="property-type">string | object</span>
2523
+ </dt>
2524
+ <dd>Specifies the format that the model must output.</dd>
2525
+
2227
2526
  </dl>
2228
2527
 
2229
2528
  <h2>List Runs</h2>
@@ -2328,9 +2627,35 @@
2328
2627
  <span class="property-type">string</span>
2329
2628
  </dt>
2330
2629
  <dd>
2331
- Appends additional instructions at the end of the instructions for the
2332
- run.
2630
+ Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis.
2631
+ </dd>
2632
+
2633
+ <dt class="optional">
2634
+ additional_instructions
2635
+ <a
2636
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-additional_instructions"
2637
+ target="_blank"
2638
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2639
+ ></a>
2640
+ <span class="property-type">string</span>
2641
+ </dt>
2642
+ <dd>
2643
+ Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.
2644
+ </dd>
2645
+
2646
+ <dt class="optional">
2647
+ additional_messages
2648
+ <a
2649
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-additional_messages"
2650
+ target="_blank"
2651
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2652
+ ></a>
2653
+ <span class="property-type">array</span>
2654
+ </dt>
2655
+ <dd>
2656
+ Adds additional messages to the thread before creating the run.
2333
2657
  </dd>
2658
+
2334
2659
  <dt class="optional">
2335
2660
  tools
2336
2661
  <a
@@ -2338,7 +2663,7 @@
2338
2663
  target="_blank"
2339
2664
  ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2340
2665
  ></a>
2341
- <span class="property-type"></span>array
2666
+ <span class="property-type">array</span>
2342
2667
  </dt>
2343
2668
  <dd>Override the tools the assistant can use for this run.</dd>
2344
2669
  <dt class="optional">
@@ -2351,6 +2676,95 @@
2351
2676
  <span class="property-type">object</span>
2352
2677
  </dt>
2353
2678
  <dd>Set of 16 key-value pairs that can be attached to an object.</dd>
2679
+
2680
+ <dt class="optional">
2681
+ temperature
2682
+ <a
2683
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-temperature"
2684
+ target="_blank"
2685
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2686
+ ></a>
2687
+ <span class="property-type">number</span>
2688
+ </dt>
2689
+ <dd>What sampling temperature to use, between 0 and 2.</dd>
2690
+
2691
+ <dt class="optional">
2692
+ top_p
2693
+ <a
2694
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-top_p"
2695
+ target="_blank"
2696
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2697
+ ></a>
2698
+ <span class="property-type">number</span>
2699
+ </dt>
2700
+ <dd>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.</dd>
2701
+
2702
+ <dt class="optional">
2703
+ stream
2704
+ <a
2705
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-stream"
2706
+ target="_blank"
2707
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2708
+ ></a>
2709
+ <span class="property-type">boolean</span>
2710
+ </dt>
2711
+ <dd>If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message.</dd>
2712
+
2713
+ <dt class="optional">
2714
+ max_prompt_tokens
2715
+ <a
2716
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-max_prompt_tokens"
2717
+ target="_blank"
2718
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2719
+ ></a>
2720
+ <span class="property-type">integer</span>
2721
+ </dt>
2722
+ <dd>The maximum number of prompt tokens that may be used over the course of the run.</dd>
2723
+
2724
+ <dt class="optional">
2725
+ max_completion_tokens
2726
+ <a
2727
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-max_completion_tokens"
2728
+ target="_blank"
2729
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2730
+ ></a>
2731
+ <span class="property-type">integer</span>
2732
+ </dt>
2733
+ <dd>The maximum number of completion tokens that may be used over the course of the run.</dd>
2734
+
2735
+ <dt class="optional">
2736
+ truncation_strategy
2737
+ <a
2738
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-truncation_strategy"
2739
+ target="_blank"
2740
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2741
+ ></a>
2742
+ <span class="property-type">object</span>
2743
+ </dt>
2744
+ <dd>Controls for how a thread will be truncated prior to the run.</dd>
2745
+
2746
+ <dt class="optional">
2747
+ tool_choice
2748
+ <a
2749
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-tool_choice"
2750
+ target="_blank"
2751
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2752
+ ></a>
2753
+ <span class="property-type">string or object</span>
2754
+ </dt>
2755
+ <dd>Controls for how a thread will be truncated prior to the run.</dd>
2756
+
2757
+ <dt class="optional">
2758
+ response_format
2759
+ <a
2760
+ href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-response_format"
2761
+ target="_blank"
2762
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2763
+ ></a>
2764
+ <span class="property-type">string or object</span>
2765
+ </dt>
2766
+ <dd>Specifies the format that the model must output.</dd>
2767
+
2354
2768
  </dl>
2355
2769
 
2356
2770
  <h2>Retrieve Run</h2>
@@ -2431,6 +2845,7 @@
2431
2845
  <span class="property-type">string</span>
2432
2846
  </dt>
2433
2847
  <dd>The ID of the run that requires the tool output submission.</dd>
2848
+
2434
2849
  <dt>
2435
2850
  tool_outputs
2436
2851
  <a
@@ -2441,6 +2856,18 @@
2441
2856
  <span class="property-type">array</span>
2442
2857
  </dt>
2443
2858
  <dd>A list of tools for which the outputs are being submitted.</dd>
2859
+
2860
+ <dt class="optional">
2861
+ stream
2862
+ <a
2863
+ href="https://platform.openai.com/docs/api-reference/runs/submitToolOutputs#runs-submittooloutputs-stream"
2864
+ target="_blank"
2865
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
2866
+ ></a>
2867
+ <span class="property-type">boolean</span>
2868
+ </dt>
2869
+ <dd>If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message.</dd>
2870
+
2444
2871
  </dl>
2445
2872
 
2446
2873
  <h2>Cancel Run</h2>
@@ -2673,49 +3100,592 @@
2673
3100
  <dd>The ID of the thread to delete.</dd>
2674
3101
  </dl>
2675
3102
  </section>
2676
- </section>
2677
- </script>
2678
-
2679
- <script type="text/javascript">
2680
- RED.nodes.registerType("Service Host", {
2681
- category: "config",
2682
- defaults: {
2683
- apiBase: { value: "https://api.openai.com/v1", required: true },
2684
- secureApiKeyHeaderOrQueryName: { value: "Authorization" },
2685
- organizationId: { value: "" },
2686
- secureApiKeyIsQuery: { value: false },
2687
- name: { value: "" },
2688
- },
2689
- credentials: {
2690
- secureApiKeyValue: { type: "password" },
2691
- temp: { type: "text" },
2692
- },
2693
- label: function () {
2694
- return this.name || this.host;
2695
- },
2696
- labelStyle: function () {
2697
- return this.name ? "node_label_italic" : "";
2698
- },
2699
- oneditprepare: function () {
2700
- $("#node-config-input-secureApiKeyIsQuery-label").hide();
2701
- $("#node-config-input-secureApiKeyIsQuery").hide();
2702
- var selected = $(
2703
- "#node-config-input-secureApiKeyIsQuery option:selected",
2704
- );
2705
- if (!selected.val()) {
2706
- $("#node-config-input-secureApiKeyIsQuery").val(false);
2707
- };
2708
- },
2709
- });
2710
- </script>
2711
3103
 
2712
- <script type="text/html" data-template-name="Service Host">
2713
- <div class="form-row">
2714
- <label id="node-config-input-apiBase-label" for="node-config-input-apiBase"
2715
- ><i class="fa fa-list"></i>
2716
- <span data-i18n="OpenaiApi.label.apiBase"></span
2717
- ></label>
2718
- <input
3104
+ <!-- Begin Vector Stores Documentation-->
3105
+ <section>
3106
+ <h1 style="font-weight: bold;">🔢 Vector Stores</h1>
3107
+ <a
3108
+ href="https://platform.openai.com/docs/api-reference/vector-stores"
3109
+ target="_blank"
3110
+ >Official Documentation
3111
+ <i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3112
+ ></a>
3113
+ <h2>Create Vector Store</h2>
3114
+ <p>Create a vector store.</p>
3115
+ <dl class="message-properties">
3116
+ <h2>msg.payload Properties</h2>
3117
+ <dt class="optional">
3118
+ file_ids
3119
+ <a
3120
+ href="https://platform.openai.com/docs/api-reference/vector-stores/create"
3121
+ target="_blank"
3122
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3123
+ ></a>
3124
+ <span class="property-type">array</span>
3125
+ </dt>
3126
+ <dd>A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.</dd>
3127
+
3128
+ <dt class="optional">
3129
+ name
3130
+ <a
3131
+ href="https://platform.openai.com/docs/api-reference/vector-stores/create#vector-stores-create-name"
3132
+ target="_blank"
3133
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3134
+ ></a>
3135
+ <span class="property-type">string</span>
3136
+ </dt>
3137
+ <dd>The name of the vector store.</dd>
3138
+
3139
+ <dt class="optional">
3140
+ expires_after
3141
+ <a
3142
+ href="https://platform.openai.com/docs/api-reference/vector-stores/create#vector-stores-create-expires_after"
3143
+ target="_blank"
3144
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3145
+ ></a>
3146
+ <span class="property-type">object</span>
3147
+ </dt>
3148
+ <dd>The expiration policy for a vector store.</dd>
3149
+
3150
+ <dt class="optional">
3151
+ metadata
3152
+ <a
3153
+ href="https://platform.openai.com/docs/api-reference/vector-stores/create#vector-stores-create-metadata"
3154
+ target="_blank"
3155
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3156
+ ></a>
3157
+ <span class="property-type">object</span>
3158
+ </dt>
3159
+ <dd>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.</dd>
3160
+ </dl>
3161
+
3162
+ <h2>List Vector Stores</h2>
3163
+ <p>Returns a list of vector stores.</p>
3164
+ <dl class="message-properties">
3165
+ <h2>msg.payload Properties</h2>
3166
+
3167
+ <dt class="optional">
3168
+ limit
3169
+ <a
3170
+ href="https://platform.openai.com/docs/api-reference/vector-stores/list#vector-stores-list-limit"
3171
+ target="_blank"
3172
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3173
+ ></a>
3174
+ <span class="property-type">integer</span>
3175
+ </dt>
3176
+ <dd>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</dd>
3177
+
3178
+ <dt class="optional">
3179
+ order
3180
+ <a
3181
+ href="https://platform.openai.com/docs/api-reference/vector-stores/list#vector-stores-list-order"
3182
+ target="_blank"
3183
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3184
+ ></a>
3185
+ <span class="property-type">string</span>
3186
+ </dt>
3187
+ <dd>Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.</dd>
3188
+
3189
+ <dt class="optional">
3190
+ after
3191
+ <a
3192
+ href="https://platform.openai.com/docs/api-reference/vector-stores/list#vector-stores-list-after"
3193
+ target="_blank"
3194
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3195
+ ></a>
3196
+ <span class="property-type">string</span>
3197
+ </dt>
3198
+ <dd>A cursor for use in pagination. after is an object ID that defines your place in the list.</dd>
3199
+
3200
+ <dt class="optional">
3201
+ before
3202
+ <a
3203
+ href="https://platform.openai.com/docs/api-reference/vector-stores/list#vector-stores-list-before"
3204
+ target="_blank"
3205
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3206
+ ></a>
3207
+ <span class="property-type">string</span>
3208
+ </dt>
3209
+ <dd>A cursor for use in pagination. before is an object ID that defines your place in the list.</dd>
3210
+ </dl>
3211
+
3212
+ <h2>Retrieve Vector Store</h2>
3213
+ <p>Retrieves a vector store.</p>
3214
+ <dl class="message-properties">
3215
+ <h2>msg.payload Properties</h2>
3216
+
3217
+ <dt>
3218
+ vector_store_id
3219
+ <a
3220
+ href="https://platform.openai.com/docs/api-reference/vector-stores/retrieve#vector-stores-retrieve-vector_store_id"
3221
+ target="_blank"
3222
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3223
+ ></a>
3224
+ <span class="property-type">string</span>
3225
+ </dt>
3226
+ <dd>The ID of the vector store to retrieve.</dd>
3227
+ </dl>
3228
+
3229
+ <h2>Modify Vector Store</h2>
3230
+ <p>Modifies a vector store.</p>
3231
+ <dl class="message-properties">
3232
+ <h2>msg.payload Properties</h2>
3233
+
3234
+ <dt>
3235
+ vector_store_id
3236
+ <a
3237
+ href="https://platform.openai.com/docs/api-reference/vector-stores/modify#vector-stores-modify-vector_store_id"
3238
+ target="_blank"
3239
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3240
+ ></a>
3241
+ <span class="property-type">string</span>
3242
+ </dt>
3243
+ <dd>The ID of the vector store to modify.</dd>
3244
+
3245
+ <dt class="optional">
3246
+ name
3247
+ <a
3248
+ href="https://platform.openai.com/docs/api-reference/vector-stores/modify#vector-stores-modify-name"
3249
+ target="_blank"
3250
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3251
+ ></a>
3252
+ <span class="property-type">string</span>
3253
+ </dt>
3254
+ <dd>The name of the vector store.</dd>
3255
+
3256
+ <dt class="optional">
3257
+ expires_after
3258
+ <a
3259
+ href="https://platform.openai.com/docs/api-reference/vector-stores/modify#vector-stores-modify-expires_after"
3260
+ target="_blank"
3261
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3262
+ ></a>
3263
+ <span class="property-type">object</span>
3264
+ </dt>
3265
+ <dd>The expiration policy for a vector store.</dd>
3266
+
3267
+ <dt class="optional">
3268
+ metadata
3269
+ <a
3270
+ href="https://platform.openai.com/docs/api-reference/vector-stores/modify#vector-stores-modify-metadata"
3271
+ target="_blank"
3272
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3273
+ ></a>
3274
+ <span class="property-type">object</span>
3275
+ </dt>
3276
+ <dd>Set of 16 key-value pairs that can be attached to an object.</dd>
3277
+ </dl>
3278
+ <dl>
3279
+ <h2>Delete Vector Store</h2>
3280
+ <p>Delete a vector store.</p>
3281
+ <dl class="message-properties">
3282
+ <h2>msg.payload Properties</h2>
3283
+
3284
+ <dt>
3285
+ vector_store_id
3286
+ <a
3287
+ href="https://platform.openai.com/docs/api-reference/vector-stores/delete#vector-stores-delete-vector_store_id"
3288
+ target="_blank"
3289
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3290
+ ></a>
3291
+ <span class="property-type">string</span>
3292
+ </dt>
3293
+ <dd>The ID of the vector store to delete.</dd>
3294
+ </dl>
3295
+
3296
+ </section>
3297
+ <!-- End Vector Stores Documentation -->
3298
+
3299
+ <!-- Begin Vector Store Files Documentation -->
3300
+
3301
+ <section>
3302
+ <h1 style="font-weight: bold;">🔢 Vector Store Files</h1>
3303
+ <a
3304
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files"
3305
+ target="_blank"
3306
+ >Official Documentation
3307
+ <i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3308
+ ></a>
3309
+
3310
+ <h2>Create Vector Store File</h2>
3311
+ <p>Create a vector store file by attaching a File to a vector store.</p>
3312
+ <dl class="message-properties">
3313
+ <h2>msg.payload Properties</h2>
3314
+ <dt>
3315
+ vector_store_id
3316
+ <a
3317
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/createFile#vector-stores-files-createfile-vector_store_id"
3318
+ target="_blank"
3319
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3320
+ ></a>
3321
+ <span class="property-type">string</span>
3322
+ </dt>
3323
+ <dd>The ID of the vector store for which to create a File.</dd>
3324
+
3325
+ <dt>
3326
+ file_id
3327
+ <a
3328
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/createFile#vector-stores-files-createfile-file_id"
3329
+ target="_blank"
3330
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3331
+ ></a>
3332
+ <span class="property-type">string</span>
3333
+ </dt>
3334
+ <dd>A File ID that the vector store should use. Useful for tools like file_search that can access files.</dd>
3335
+ </dl>
3336
+
3337
+
3338
+ <h2>List Vector Store Files</h2>
3339
+ <p>Returns a list of vector store files.</p>
3340
+ <dl class="message-properties">
3341
+ <h2>msg.payload Properties</h2>
3342
+ <dt>
3343
+ vector_store_id
3344
+ <a
3345
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles#vector-stores-files-listfiles-vector_store_id"
3346
+ target="_blank"
3347
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3348
+ ></a>
3349
+ <span class="property-type">string</span>
3350
+ </dt>
3351
+ <dd>The ID of the vector store that the files belong to.</dd>
3352
+
3353
+ <dt class="optional">
3354
+ limit
3355
+ <a
3356
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles#vector-stores-files-listfiles-limit"
3357
+ target="_blank"
3358
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3359
+ ></a>
3360
+ <span class="property-type">integer</span>
3361
+ </dt>
3362
+ <dd>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</dd>
3363
+
3364
+ <dt class="optional">
3365
+ order
3366
+ <a
3367
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles#vector-stores-files-listfiles-order"
3368
+ target="_blank"
3369
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3370
+ ></a>
3371
+ <span class="property-type">string</span>
3372
+ </dt>
3373
+ <dd>Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.</dd>
3374
+
3375
+ <dt class="optional">
3376
+ before
3377
+ <a
3378
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles#vector-stores-files-listfiles-before"
3379
+ target="_blank"
3380
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3381
+ ></a>
3382
+ <span class="property-type">string</span>
3383
+ </dt>
3384
+ <dd>A cursor for use in pagination. before is an object ID that defines your place in the list.</dd>
3385
+
3386
+ <dt class="optional">
3387
+ after
3388
+ <a
3389
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles#vector-stores-files-listfiles-after"
3390
+ target="_blank"
3391
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3392
+ ></a>
3393
+ <span class="property-type">string</span>
3394
+ </dt>
3395
+ <dd>A cursor for use in pagination. after is an object ID that defines your place in the list.</dd>
3396
+
3397
+ <dt class="optional">
3398
+ filter
3399
+ <a
3400
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles#vector-stores-files-listfiles-filter"
3401
+ target="_blank"
3402
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3403
+ ></a>
3404
+ <span class="property-type">string</span>
3405
+ </dt>
3406
+ <dd>Filter by file status. One of in_progress, completed, failed, cancelled.</dd>
3407
+
3408
+ </dl>
3409
+
3410
+ <h2>Retrieve Vector Store File</h2>
3411
+ <p>Retrieves a vector store file.</p>
3412
+ <dl class="message-properties">
3413
+ <h2>msg.payload Properties</h2>
3414
+ <dt>
3415
+ vector_store_id
3416
+ <a
3417
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/getFile#vector-stores-files-getfile-vector_store_id"
3418
+ target="_blank"
3419
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3420
+ ></a>
3421
+ <span class="property-type">string</span>
3422
+ </dt>
3423
+ <dd>The ID of the vector store that the file belongs to.</dd>
3424
+
3425
+ <dt>
3426
+ file_id
3427
+ <a
3428
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/getFile#vector-stores-files-getfile-file_id"
3429
+ target="_blank"
3430
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3431
+ ></a>
3432
+ <span class="property-type">string</span>
3433
+ </dt>
3434
+ <dd>The ID of the file being retrieved.</dd>
3435
+
3436
+ </dl>
3437
+
3438
+ <h2>Delete Vector Store File</h2>
3439
+ <p>Remove a file from a vector store.</p>
3440
+ <dl class="message-properties">
3441
+ <h2>msg.payload Properties</h2>
3442
+ <dt>
3443
+ vector_store_id
3444
+ <a
3445
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile#vector-stores-files-deletefile-vector_store_id"
3446
+ target="_blank"
3447
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3448
+ ></a>
3449
+ <span class="property-type">string</span>
3450
+ </dt>
3451
+ <dd>The ID of the vector store that the file belongs to.</dd>
3452
+
3453
+ <dt>
3454
+ file_id
3455
+ <a
3456
+ href="https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile#vector-stores-files-deletefile-file_id"
3457
+ target="_blank"
3458
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3459
+ ></a>
3460
+ <span class="property-type">string</span>
3461
+ </dt>
3462
+ <dd>The ID of the file to remove from the vector store.</dd>
3463
+
3464
+ </dl>
3465
+
3466
+ </section>
3467
+
3468
+ <!-- End Vector Store Files Documentation -->
3469
+
3470
+ <!-- Begin Vector Store File Batch Documentation -->
3471
+ <section>
3472
+ <h1 style="font-weight: bold;">🔢 Vector Store File Batches</h1>
3473
+ <a
3474
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches"
3475
+ target="_blank"
3476
+ >Official Documentation
3477
+ <i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3478
+ ></a>
3479
+ <h2>Create Vector Store File Batch</h2>
3480
+ <p>Create a vector store file batch.</p>
3481
+ <dl class="message-properties">
3482
+ <h2>msg.payload Properties</h2>
3483
+ <dt>
3484
+ vector_store_id
3485
+ <a
3486
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch#vector-stores-file-batches-createbatch-vector_store_id"
3487
+ target="_blank"
3488
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3489
+ ></a>
3490
+ <span class="property-type">string</span>
3491
+ </dt>
3492
+ <dd>The ID of the vector store for which to create a File Batch.</dd>
3493
+
3494
+ <dt>
3495
+ file_ids
3496
+ <a
3497
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch#vector-stores-file-batches-createbatch-file_ids"
3498
+ target="_blank"
3499
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3500
+ ></a>
3501
+ <span class="property-type">array</span>
3502
+ </dt>
3503
+ <dd>A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.</dd>
3504
+ </dl>
3505
+
3506
+
3507
+ <h2>Retrieve Vector Store File Batch</h2>
3508
+ <p>Retrieves a vector store file batch.</p>
3509
+ <dl class="message-properties">
3510
+ <h2>msg.payload Properties</h2>
3511
+ <dt>
3512
+ vector_store_id
3513
+ <a
3514
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/getBatch#vector-stores-file-batches-getbatch-vector_store_id"
3515
+ target="_blank"
3516
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3517
+ ></a>
3518
+ <span class="property-type">string</span>
3519
+ </dt>
3520
+ <dd>The ID of the vector store that the file batch belongs to.</dd>
3521
+
3522
+ <dt>
3523
+ batch_id
3524
+ <a
3525
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/getBatch#vector-stores-file-batches-getbatch-batch_id"
3526
+ target="_blank"
3527
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3528
+ ></a>
3529
+ <span class="property-type">string</span>
3530
+ </dt>
3531
+ <dd>The ID of the file batch being retrieved.</dd>
3532
+ </dl>
3533
+
3534
+ <h2>Cancel Vector Store File Batch</h2>
3535
+ <p>Cancel a vector store file batch.</p>
3536
+ <dl class="message-properties">
3537
+ <h2>msg.payload Properties</h2>
3538
+ <dt>
3539
+ vector_store_id
3540
+ <a
3541
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/cancelBatch#vector-stores-file-batches-cancelbatch-vector_store_id"
3542
+ target="_blank"
3543
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3544
+ ></a>
3545
+ <span class="property-type">string</span>
3546
+ </dt>
3547
+ <dd>The ID of the vector store that the file batch belongs to.</dd>
3548
+
3549
+ <dt>
3550
+ batch_id
3551
+ <a
3552
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/cancelBatch#vector-stores-file-batches-cancelbatch-batch_id"
3553
+ target="_blank"
3554
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3555
+ ></a>
3556
+ <span class="property-type">string</span>
3557
+ </dt>
3558
+ <dd>The ID of the file batch to cancel.</dd>
3559
+ </dl>
3560
+
3561
+ <h2>List Vector Store Batch Files</h2>
3562
+ <p>Returns a list of vector store files in a batch.</p>
3563
+ <dl class="message-properties">
3564
+ <h2>msg.payload Properties</h2>
3565
+ <dt>
3566
+ vector_store_id
3567
+ <a
3568
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-vector_store_id"
3569
+ target="_blank"
3570
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3571
+ ></a>
3572
+ <span class="property-type">string</span>
3573
+ </dt>
3574
+ <dd>The ID of the vector store that the files belong to.</dd>
3575
+
3576
+ <dt>
3577
+ batch_id
3578
+ <a
3579
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-batch_id"
3580
+ target="_blank"
3581
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3582
+ ></a>
3583
+ <span class="property-type">string</span>
3584
+ </dt>
3585
+ <dd>The ID of the file batch that the files belong to.</dd>
3586
+
3587
+ <dt class="optional">
3588
+ limit
3589
+ <a
3590
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-limit"
3591
+ target="_blank"
3592
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3593
+ ></a>
3594
+ <span class="property-type">integer</span>
3595
+ </dt>
3596
+ <dd>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</dd>
3597
+
3598
+ <dt class="optional">
3599
+ order
3600
+ <a
3601
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-order"
3602
+ target="_blank"
3603
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3604
+ ></a>
3605
+ <span class="property-type">string</span>
3606
+ </dt>
3607
+ <dd>Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.</dd>
3608
+
3609
+ <dt class="optional">
3610
+ after
3611
+ <a
3612
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-after"
3613
+ target="_blank"
3614
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3615
+ ></a>
3616
+ <span class="property-type">string</span>
3617
+ </dt>
3618
+ <dd>A cursor for use in pagination. after is an object ID that defines your place in the list.</dd>
3619
+
3620
+ <dt class="optional">
3621
+ before
3622
+ <a
3623
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-before"
3624
+ target="_blank"
3625
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3626
+ ></a>
3627
+ <span class="property-type">string</span>
3628
+ </dt>
3629
+ <dd>A cursor for use in pagination. before is an object ID that defines your place in the list.</dd>
3630
+
3631
+ <dt class="optional">
3632
+ filter
3633
+ <a
3634
+ href="https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles#vector-stores-file-batches-listbatchfiles-filter"
3635
+ target="_blank"
3636
+ ><i class="fa fa-external-link fa-sm" aria-hidden="true"></i
3637
+ ></a>
3638
+ <span class="property-type">string</span>
3639
+ </dt>
3640
+ <dd>Filter by file status. One of in_progress, completed, failed, cancelled.</dd>
3641
+
3642
+ </dl>
3643
+ </section>
3644
+ <!-- End Vector Store File Batch Documentation -->
3645
+
3646
+ </section>
3647
+ </script>
3648
+
3649
+ <script type="text/javascript">
3650
+ RED.nodes.registerType("Service Host", {
3651
+ category: "config",
3652
+ defaults: {
3653
+ apiBase: { value: "https://api.openai.com/v1", required: true },
3654
+ secureApiKeyHeaderOrQueryName: { value: "Authorization" },
3655
+ organizationId: { value: "" },
3656
+ secureApiKeyIsQuery: { value: false },
3657
+ name: { value: "" },
3658
+ },
3659
+ credentials: {
3660
+ secureApiKeyValue: { type: "password" },
3661
+ temp: { type: "text" },
3662
+ },
3663
+ label: function () {
3664
+ return this.name || this.host;
3665
+ },
3666
+ labelStyle: function () {
3667
+ return this.name ? "node_label_italic" : "";
3668
+ },
3669
+ oneditprepare: function () {
3670
+ $("#node-config-input-secureApiKeyIsQuery-label").hide();
3671
+ $("#node-config-input-secureApiKeyIsQuery").hide();
3672
+ var selected = $(
3673
+ "#node-config-input-secureApiKeyIsQuery option:selected",
3674
+ );
3675
+ if (!selected.val()) {
3676
+ $("#node-config-input-secureApiKeyIsQuery").val(false);
3677
+ };
3678
+ },
3679
+ });
3680
+ </script>
3681
+
3682
+ <script type="text/html" data-template-name="Service Host">
3683
+ <div class="form-row">
3684
+ <label id="node-config-input-apiBase-label" for="node-config-input-apiBase"
3685
+ ><i class="fa fa-list"></i>
3686
+ <span data-i18n="OpenaiApi.label.apiBase"></span
3687
+ ></label>
3688
+ <input
2719
3689
  type="text"
2720
3690
  id="node-config-input-apiBase"
2721
3691
  placeholder="https://api.openai.com/v1"
@@ -2789,4 +3759,4 @@
2789
3759
  <script type="text/html" data-help-name="Service Host">
2790
3760
  <p><b>Header</b>: Variable name to set API key</p>
2791
3761
  <p><b>Value</b>: Value of API key</p>
2792
- </script>
3762
+ </script>