@inductiv/node-red-openai-api 1.103.0 → 6.27.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/README.md +213 -86
- package/examples/realtime/client-secrets.json +182 -0
- package/examples/responses/computer-use.json +142 -0
- package/examples/responses/mcp.json +1 -1
- package/examples/responses/phase.json +102 -0
- package/examples/responses/tool-search.json +107 -0
- package/examples/responses/websocket.json +172 -0
- package/internals/openai-api-features-v6.23.0-v6.27.0.md +96 -0
- package/lib.js +12696 -15003
- package/locales/en-US/node.json +50 -1
- package/node.html +1723 -1012
- package/node.js +204 -54
- package/package.json +9 -7
- package/src/assistants/help.html +1 -77
- package/src/audio/help.html +1 -37
- package/src/batch/help.html +3 -17
- package/src/chat/help.html +11 -89
- package/src/container-files/help.html +1 -27
- package/src/containers/help.html +8 -18
- package/src/conversations/help.html +135 -0
- package/src/conversations/methods.js +73 -0
- package/src/conversations/template.html +10 -0
- package/src/embeddings/help.html +1 -11
- package/src/evals/help.html +249 -0
- package/src/evals/methods.js +114 -0
- package/src/evals/template.html +14 -0
- package/src/files/help.html +4 -17
- package/src/fine-tuning/help.html +1 -35
- package/src/images/help.html +1 -45
- package/src/lib.js +53 -1
- package/src/messages/help.html +19 -39
- package/src/messages/methods.js +13 -0
- package/src/messages/template.html +7 -18
- package/src/models/help.html +1 -5
- package/src/moderations/help.html +1 -5
- package/src/node.html +126 -37
- package/src/realtime/help.html +209 -0
- package/src/realtime/methods.js +45 -0
- package/src/realtime/template.html +7 -0
- package/src/responses/help.html +286 -63
- package/src/responses/methods.js +234 -16
- package/src/responses/template.html +21 -1
- package/src/responses/websocket.js +150 -0
- package/src/runs/help.html +1 -123
- package/src/skills/help.html +183 -0
- package/src/skills/methods.js +99 -0
- package/src/skills/template.html +13 -0
- package/src/threads/help.html +1 -15
- package/src/uploads/help.html +1 -21
- package/src/vector-store-file-batches/help.html +1 -27
- package/src/vector-store-file-batches/methods.js +5 -5
- package/src/vector-store-files/help.html +1 -25
- package/src/vector-store-files/methods.js +4 -7
- package/src/vector-stores/help.html +2 -31
- package/src/vector-stores/methods.js +5 -11
- package/src/vector-stores/template.html +7 -22
- package/src/videos/help.html +113 -0
- package/src/videos/methods.js +50 -0
- package/src/videos/template.html +8 -0
- package/src/webhooks/help.html +61 -0
- package/src/webhooks/methods.js +40 -0
- package/src/webhooks/template.html +4 -0
- package/test/openai-methods-mapping.test.js +1559 -0
- package/test/openai-node-auth-routing.test.js +206 -0
- package/test/openai-responses-websocket.test.js +472 -0
- package/test/service-host-editor-template.test.js +56 -0
- package/test/service-host-node.test.js +185 -0
- package/test/services.test.js +150 -0
- package/test/utils.test.js +78 -0
package/src/responses/help.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<section>
|
|
2
2
|
<details>
|
|
3
3
|
<summary style="font-weight: bold;">🗨️ Responses</summary>
|
|
4
|
-
<a href="https://
|
|
4
|
+
<a href="https://developers.openai.com/api/reference/typescript/resources/responses/" target="_blank">Official Documentation
|
|
5
5
|
<i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
6
6
|
<h4 style="font-weight: bolder;"> ⋙ Create Model Response</h4>
|
|
7
7
|
<p>Creates a model response.</p>
|
|
@@ -10,133 +10,163 @@
|
|
|
10
10
|
|
|
11
11
|
<dt>
|
|
12
12
|
input
|
|
13
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-input"
|
|
14
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
15
13
|
<span class="property-type">string | array</span>
|
|
16
14
|
</dt>
|
|
17
|
-
<dd>
|
|
15
|
+
<dd>
|
|
16
|
+
Text, image, or file inputs to the model, used to generate a response.
|
|
17
|
+
For assistant message items in an array input, you may also set
|
|
18
|
+
<code>phase</code> to <code>commentary</code> or <code>final_answer</code>.
|
|
19
|
+
</dd>
|
|
18
20
|
|
|
19
21
|
<dt>
|
|
20
22
|
model
|
|
21
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-model"
|
|
22
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
23
23
|
<span class="property-type">string</span>
|
|
24
24
|
</dt>
|
|
25
|
-
<dd>
|
|
25
|
+
<dd>
|
|
26
|
+
Model ID used to generate the response, including newer Responses-compatible
|
|
27
|
+
model strings such as <code>gpt-5.4</code>.
|
|
28
|
+
</dd>
|
|
29
|
+
|
|
30
|
+
<dt class="optional">
|
|
31
|
+
background
|
|
32
|
+
<span class="property-type">boolean</span>
|
|
33
|
+
</dt>
|
|
34
|
+
<dd>Whether to run the model response in the background.</dd>
|
|
35
|
+
|
|
36
|
+
<dt class="optional">
|
|
37
|
+
context_management
|
|
38
|
+
<span class="property-type">array</span>
|
|
39
|
+
</dt>
|
|
40
|
+
<dd>Context management settings, including compaction behavior.</dd>
|
|
41
|
+
|
|
42
|
+
<dt class="optional">
|
|
43
|
+
conversation
|
|
44
|
+
<span class="property-type">string | object</span>
|
|
45
|
+
</dt>
|
|
46
|
+
<dd>Conversation context to prepend for this response.</dd>
|
|
26
47
|
|
|
27
48
|
<dt class="optional">
|
|
28
49
|
include
|
|
29
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-include"
|
|
30
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
31
50
|
<span class="property-type">array</span>
|
|
32
51
|
</dt>
|
|
33
52
|
<dd>Specify additional output data to include in the model response.</dd>
|
|
34
53
|
|
|
35
54
|
<dt class="optional">
|
|
36
55
|
instructions
|
|
37
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-instructions"
|
|
38
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
39
56
|
<span class="property-type">string</span>
|
|
40
57
|
</dt>
|
|
41
58
|
<dd>Inserts a system (or developer) message as the first item in the model's context.</dd>
|
|
42
59
|
|
|
43
60
|
<dt class="optional">
|
|
44
61
|
max_output_tokens
|
|
45
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-max_output_tokens"
|
|
46
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
47
62
|
<span class="property-type">integer</span>
|
|
48
63
|
</dt>
|
|
49
64
|
<dd>An upper bound for the number of tokens that can be generated for a response.</dd>
|
|
50
65
|
|
|
51
66
|
<dt class="optional">
|
|
52
67
|
metadata
|
|
53
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-metadata"
|
|
54
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
55
68
|
<span class="property-type">object</span>
|
|
56
69
|
</dt>
|
|
57
70
|
<dd>Set of 16 key-value pairs that can be attached to an object.</dd>
|
|
58
71
|
|
|
59
72
|
<dt class="optional">
|
|
60
73
|
parallel_tool_calls
|
|
61
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-parallel_tool_calls"
|
|
62
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
63
74
|
<span class="property-type">boolean</span>
|
|
64
75
|
</dt>
|
|
65
76
|
<dd>Whether to allow the model to run tool calls in parallel.</dd>
|
|
66
77
|
|
|
67
78
|
<dt class="optional">
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
71
|
-
<span class="property-type">boolean</span>
|
|
79
|
+
previous_response_id
|
|
80
|
+
<span class="property-type">string</span>
|
|
72
81
|
</dt>
|
|
73
|
-
<dd>
|
|
82
|
+
<dd>The unique ID of the previous response to the model.</dd>
|
|
74
83
|
|
|
75
84
|
<dt class="optional">
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
85
|
+
prompt
|
|
86
|
+
<span class="property-type">object</span>
|
|
87
|
+
</dt>
|
|
88
|
+
<dd>Reference to a reusable prompt template and variables.</dd>
|
|
89
|
+
|
|
90
|
+
<dt class="optional">
|
|
91
|
+
prompt_cache_key
|
|
79
92
|
<span class="property-type">string</span>
|
|
80
93
|
</dt>
|
|
81
|
-
<dd>
|
|
94
|
+
<dd>Stable key used to improve prompt cache hit rates.</dd>
|
|
95
|
+
|
|
96
|
+
<dt class="optional">
|
|
97
|
+
prompt_cache_retention
|
|
98
|
+
<span class="property-type">string</span>
|
|
99
|
+
</dt>
|
|
100
|
+
<dd>Prompt cache retention policy, such as <code>in-memory</code> or <code>24h</code>.</dd>
|
|
82
101
|
|
|
83
102
|
<dt class="optional">
|
|
84
103
|
reasoning
|
|
85
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-reasoning"
|
|
86
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
87
104
|
<span class="property-type">object</span>
|
|
88
105
|
</dt>
|
|
89
106
|
<dd>o-series models only. See official docs for option properties.</dd>
|
|
90
107
|
|
|
108
|
+
<dt class="optional">
|
|
109
|
+
safety_identifier
|
|
110
|
+
<span class="property-type">string</span>
|
|
111
|
+
</dt>
|
|
112
|
+
<dd>Stable end-user identifier used for abuse detection and safety controls.</dd>
|
|
113
|
+
|
|
114
|
+
<dt class="optional">
|
|
115
|
+
service_tier
|
|
116
|
+
<span class="property-type">string</span>
|
|
117
|
+
</dt>
|
|
118
|
+
<dd>Service tier selection, for example <code>default</code>, <code>flex</code>, or <code>priority</code>.</dd>
|
|
119
|
+
|
|
91
120
|
<dt class="optional">
|
|
92
121
|
store
|
|
93
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-store"
|
|
94
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
95
122
|
<span class="property-type">boolean</span>
|
|
96
123
|
</dt>
|
|
97
124
|
<dd>Whether to store the generated model response for later retrieval via API.</dd>
|
|
98
125
|
|
|
99
126
|
<dt class="optional">
|
|
100
127
|
stream
|
|
101
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-stream"
|
|
102
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
103
128
|
<span class="property-type">boolean</span>
|
|
104
129
|
</dt>
|
|
105
130
|
<dd>If set to true, the model response data will be streamed to the client as it is generated using
|
|
106
131
|
server-sent events.</dd>
|
|
107
132
|
|
|
133
|
+
<dt class="optional">
|
|
134
|
+
stream_options
|
|
135
|
+
<span class="property-type">object</span>
|
|
136
|
+
</dt>
|
|
137
|
+
<dd>Streaming options such as obfuscation behavior for event payloads.</dd>
|
|
138
|
+
|
|
108
139
|
<dt class="optional">
|
|
109
140
|
temperature
|
|
110
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-temperature"
|
|
111
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
112
141
|
<span class="property-type">number</span>
|
|
113
142
|
</dt>
|
|
114
143
|
<dd>What sampling temperature to use, between 0 and 2.</dd>
|
|
115
144
|
|
|
116
145
|
<dt class="optional">
|
|
117
146
|
text
|
|
118
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-text"
|
|
119
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
120
147
|
<span class="property-type">object</span>
|
|
121
148
|
</dt>
|
|
122
149
|
<dd>Configuration options for a text response from the model.</dd>
|
|
123
150
|
|
|
124
151
|
<dt class="optional">
|
|
125
152
|
tool_choice
|
|
126
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-tool_choice"
|
|
127
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
128
153
|
<span class="property-type">string or object</span>
|
|
129
154
|
</dt>
|
|
130
155
|
<dd>How the model should select which tool (or tools) to use when generating a response.</dd>
|
|
131
156
|
|
|
132
157
|
<dt class="optional">
|
|
133
158
|
tools
|
|
134
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-tools"
|
|
135
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
136
159
|
<span class="property-type">array</span>
|
|
137
160
|
</dt>
|
|
138
161
|
<dd>
|
|
139
162
|
An array of tools the model may call while generating a response.
|
|
163
|
+
This includes Model Context Protocol tools, Tool Search via
|
|
164
|
+
<code>{ "type": "tool_search" }</code>, and GA computer use via
|
|
165
|
+
<code>{ "type": "computer" }</code>.
|
|
166
|
+
Deferred tool loading is supported by setting
|
|
167
|
+
<code>defer_loading: true</code> on tool definitions.
|
|
168
|
+
Computer-tool workflows typically require follow-up requests that send
|
|
169
|
+
<code>computer_call_output</code> items back through <code>input</code>.
|
|
140
170
|
For Model Context Protocol (MCP) tools, each object in the array should follow <a
|
|
141
171
|
href="https://platform.openai.com/docs/guides/tools-remote-mcp?lang=javascript&utm_source==%40inductiv%2Fnode-red-openai-api"
|
|
142
172
|
target="_blank">this
|
|
@@ -145,27 +175,21 @@
|
|
|
145
175
|
|
|
146
176
|
<dt class="optional">
|
|
147
177
|
top_p
|
|
148
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-top_p"
|
|
149
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
150
178
|
<span class="property-type">number</span>
|
|
151
179
|
</dt>
|
|
152
180
|
<dd>An alternative to sampling with temperature, called nucleus sampling.</dd>
|
|
153
181
|
|
|
154
182
|
<dt class="optional">
|
|
155
183
|
truncation
|
|
156
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-truncation"
|
|
157
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
158
184
|
<span class="property-type">string</span>
|
|
159
185
|
</dt>
|
|
160
186
|
<dd>The truncation strategy to use for the model response.</dd>
|
|
161
187
|
|
|
162
188
|
<dt class="optional">
|
|
163
189
|
user
|
|
164
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/create#responses-create-user"
|
|
165
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
166
190
|
<span class="property-type">string</span>
|
|
167
191
|
</dt>
|
|
168
|
-
<dd>
|
|
192
|
+
<dd>Deprecated. Prefer <code>safety_identifier</code> and <code>prompt_cache_key</code>.</dd>
|
|
169
193
|
|
|
170
194
|
</dl>
|
|
171
195
|
|
|
@@ -176,11 +200,33 @@
|
|
|
176
200
|
|
|
177
201
|
<dt>
|
|
178
202
|
response_id
|
|
179
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/get#responses-get-response_id"
|
|
180
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
181
203
|
<span class="property-type">string</span>
|
|
182
204
|
</dt>
|
|
183
205
|
<dd>The ID of the response to retrieve.</dd>
|
|
206
|
+
|
|
207
|
+
<dt class="optional">
|
|
208
|
+
include
|
|
209
|
+
<span class="property-type">array</span>
|
|
210
|
+
</dt>
|
|
211
|
+
<dd>Additional output fields to include in the response.</dd>
|
|
212
|
+
|
|
213
|
+
<dt class="optional">
|
|
214
|
+
include_obfuscation
|
|
215
|
+
<span class="property-type">boolean</span>
|
|
216
|
+
</dt>
|
|
217
|
+
<dd>Enable obfuscation payloads in streaming events.</dd>
|
|
218
|
+
|
|
219
|
+
<dt class="optional">
|
|
220
|
+
starting_after
|
|
221
|
+
<span class="property-type">integer</span>
|
|
222
|
+
</dt>
|
|
223
|
+
<dd>Event sequence number after which to begin a streamed retrieval.</dd>
|
|
224
|
+
|
|
225
|
+
<dt class="optional">
|
|
226
|
+
stream
|
|
227
|
+
<span class="property-type">boolean</span>
|
|
228
|
+
</dt>
|
|
229
|
+
<dd>When true, retrieve the response as a stream of events.</dd>
|
|
184
230
|
</dl>
|
|
185
231
|
|
|
186
232
|
<h4 style="font-weight: bolder;"> ⋙ Delete Model Response</h4>
|
|
@@ -190,13 +236,53 @@
|
|
|
190
236
|
|
|
191
237
|
<dt>
|
|
192
238
|
response_id
|
|
193
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/delete#responses-delete-response_id"
|
|
194
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
195
239
|
<span class="property-type">string</span>
|
|
196
240
|
</dt>
|
|
197
241
|
<dd>The ID of the response to delete.</dd>
|
|
198
242
|
</dl>
|
|
199
243
|
|
|
244
|
+
<h4 style="font-weight: bolder;"> ⋙ Cancel Model Response</h4>
|
|
245
|
+
<p>Cancels an in-progress model response.</p>
|
|
246
|
+
<dl class="message-properties">
|
|
247
|
+
<h4>msg.payload Properties</h4>
|
|
248
|
+
|
|
249
|
+
<dt>
|
|
250
|
+
response_id
|
|
251
|
+
<span class="property-type">string</span>
|
|
252
|
+
</dt>
|
|
253
|
+
<dd>The ID of the response to cancel.</dd>
|
|
254
|
+
</dl>
|
|
255
|
+
|
|
256
|
+
<h4 style="font-weight: bolder;"> ⋙ Compact Model Response</h4>
|
|
257
|
+
<p>Compacts prior conversation content to reduce context size while preserving continuity.</p>
|
|
258
|
+
<dl class="message-properties">
|
|
259
|
+
<h4>msg.payload Properties</h4>
|
|
260
|
+
|
|
261
|
+
<dt>
|
|
262
|
+
model
|
|
263
|
+
<span class="property-type">string</span>
|
|
264
|
+
</dt>
|
|
265
|
+
<dd>Model ID used for compaction.</dd>
|
|
266
|
+
|
|
267
|
+
<dt class="optional">
|
|
268
|
+
input
|
|
269
|
+
<span class="property-type">string | array</span>
|
|
270
|
+
</dt>
|
|
271
|
+
<dd>Optional input items used for compaction.</dd>
|
|
272
|
+
|
|
273
|
+
<dt class="optional">
|
|
274
|
+
instructions
|
|
275
|
+
<span class="property-type">string</span>
|
|
276
|
+
</dt>
|
|
277
|
+
<dd>Optional system or developer instructions for compaction.</dd>
|
|
278
|
+
|
|
279
|
+
<dt class="optional">
|
|
280
|
+
previous_response_id
|
|
281
|
+
<span class="property-type">string</span>
|
|
282
|
+
</dt>
|
|
283
|
+
<dd>Optional previous response id to continue compaction context.</dd>
|
|
284
|
+
</dl>
|
|
285
|
+
|
|
200
286
|
<h4 style="font-weight: bolder;"> ⋙ List Input Items</h4>
|
|
201
287
|
<p>Returns a list of input items for a given response.</p>
|
|
202
288
|
<dl class="message-properties">
|
|
@@ -204,45 +290,182 @@
|
|
|
204
290
|
|
|
205
291
|
<dt>
|
|
206
292
|
response_id
|
|
207
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/input-items#responses-input-items-response_id"
|
|
208
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
209
293
|
<span class="property-type">string</span>
|
|
210
294
|
</dt>
|
|
211
295
|
<dd>The ID of the response to retrieve input items for.</dd>
|
|
212
296
|
|
|
213
297
|
<dt class="optional">
|
|
214
298
|
after
|
|
215
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/input-items#responses-input-items-after"
|
|
216
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
217
299
|
<span class="property-type">string</span>
|
|
218
300
|
</dt>
|
|
219
301
|
<dd>An item ID to list items after, used in pagination.</dd>
|
|
220
302
|
|
|
221
303
|
<dt class="optional">
|
|
222
304
|
before
|
|
223
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/input-items#responses-input-items-before"
|
|
224
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
225
305
|
<span class="property-type">string</span>
|
|
226
306
|
</dt>
|
|
227
307
|
<dd>An item ID to list items before, used in pagination.</dd>
|
|
228
308
|
|
|
229
309
|
<dt class="optional">
|
|
230
310
|
limit
|
|
231
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/input-items#responses-input-items-limit"
|
|
232
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
233
311
|
<span class="property-type">integer</span>
|
|
234
312
|
</dt>
|
|
235
313
|
<dd>A limit on the number of objects to be returned.</dd>
|
|
236
314
|
|
|
237
315
|
<dt class="optional">
|
|
238
316
|
order
|
|
239
|
-
<a href="https://platform.openai.com/docs/api-reference/responses/input-items#responses-input-items-order"
|
|
240
|
-
target="_blank"><i class="fa fa-external-link fa-sm" aria-hidden="true"></i></a>
|
|
241
317
|
<span class="property-type">string</span>
|
|
242
318
|
</dt>
|
|
243
|
-
<dd>The order to return the input items in. Default is <code>
|
|
319
|
+
<dd>The order to return the input items in. Default is <code>desc</code>.</dd>
|
|
320
|
+
|
|
321
|
+
<dt class="optional">
|
|
322
|
+
include
|
|
323
|
+
<span class="property-type">array</span>
|
|
324
|
+
</dt>
|
|
325
|
+
<dd>Additional fields to include on the returned input items.</dd>
|
|
326
|
+
|
|
327
|
+
</dl>
|
|
328
|
+
|
|
329
|
+
<h4 style="font-weight: bolder;"> ⋙ Count Input Tokens</h4>
|
|
330
|
+
<p>Counts input tokens before creating a model response.</p>
|
|
331
|
+
<dl class="message-properties">
|
|
332
|
+
<h4>msg.payload Properties</h4>
|
|
333
|
+
|
|
334
|
+
<dt class="optional">
|
|
335
|
+
model
|
|
336
|
+
<span class="property-type">string</span>
|
|
337
|
+
</dt>
|
|
338
|
+
<dd>Model ID to use for token counting.</dd>
|
|
339
|
+
|
|
340
|
+
<dt class="optional">
|
|
341
|
+
input
|
|
342
|
+
<span class="property-type">string | array</span>
|
|
343
|
+
</dt>
|
|
344
|
+
<dd>Input items to count.</dd>
|
|
345
|
+
|
|
346
|
+
<dt class="optional">
|
|
347
|
+
conversation
|
|
348
|
+
<span class="property-type">string | object</span>
|
|
349
|
+
</dt>
|
|
350
|
+
<dd>Conversation context to include in counting.</dd>
|
|
351
|
+
|
|
352
|
+
<dt class="optional">
|
|
353
|
+
instructions
|
|
354
|
+
<span class="property-type">string</span>
|
|
355
|
+
</dt>
|
|
356
|
+
<dd>System or developer instructions to include in counting.</dd>
|
|
357
|
+
|
|
358
|
+
<dt class="optional">
|
|
359
|
+
previous_response_id
|
|
360
|
+
<span class="property-type">string</span>
|
|
361
|
+
</dt>
|
|
362
|
+
<dd>Previous response ID used to continue conversation context.</dd>
|
|
363
|
+
|
|
364
|
+
<dt class="optional">
|
|
365
|
+
parallel_tool_calls
|
|
366
|
+
<span class="property-type">boolean</span>
|
|
367
|
+
</dt>
|
|
368
|
+
<dd>Whether tool calls may run in parallel for the modeled request.</dd>
|
|
369
|
+
|
|
370
|
+
<dt class="optional">
|
|
371
|
+
reasoning
|
|
372
|
+
<span class="property-type">object</span>
|
|
373
|
+
</dt>
|
|
374
|
+
<dd>Reasoning model configuration used for token accounting.</dd>
|
|
375
|
+
|
|
376
|
+
<dt class="optional">
|
|
377
|
+
text
|
|
378
|
+
<span class="property-type">object</span>
|
|
379
|
+
</dt>
|
|
380
|
+
<dd>Text output configuration used when estimating token usage.</dd>
|
|
381
|
+
|
|
382
|
+
<dt class="optional">
|
|
383
|
+
tool_choice
|
|
384
|
+
<span class="property-type">string | object</span>
|
|
385
|
+
</dt>
|
|
386
|
+
<dd>Tool selection mode used for token counting.</dd>
|
|
387
|
+
|
|
388
|
+
<dt class="optional">
|
|
389
|
+
tools
|
|
390
|
+
<span class="property-type">array</span>
|
|
391
|
+
</dt>
|
|
392
|
+
<dd>Tool definitions used for token counting.</dd>
|
|
393
|
+
|
|
394
|
+
<dt class="optional">
|
|
395
|
+
truncation
|
|
396
|
+
<span class="property-type">string</span>
|
|
397
|
+
</dt>
|
|
398
|
+
<dd>Truncation strategy for token counting context.
|
|
399
|
+
</dd>
|
|
400
|
+
|
|
401
|
+
</dl>
|
|
402
|
+
|
|
403
|
+
<h4 style="font-weight: bolder;"> ⋙ Manage Model Response WebSocket</h4>
|
|
404
|
+
<p>
|
|
405
|
+
Opens, uses, and closes a persistent Responses websocket connection from a single
|
|
406
|
+
<code>OpenAI API</code> node instance.
|
|
407
|
+
</p>
|
|
408
|
+
<p>
|
|
409
|
+
Use the same node instance for all websocket actions. Set <code>msg.payload.action</code> to
|
|
410
|
+
<code>connect</code>, <code>send</code>, or <code>close</code>.
|
|
411
|
+
</p>
|
|
412
|
+
<p>
|
|
413
|
+
Incoming server events are emitted asynchronously from this node as new messages with the raw
|
|
414
|
+
event object in <code>msg.payload</code>. Connection metadata is added under
|
|
415
|
+
<code>msg.openai</code>.
|
|
416
|
+
</p>
|
|
417
|
+
<dl class="message-properties">
|
|
418
|
+
<h4>msg.payload Properties</h4>
|
|
419
|
+
|
|
420
|
+
<dt>
|
|
421
|
+
action
|
|
422
|
+
<span class="property-type">string</span>
|
|
423
|
+
</dt>
|
|
424
|
+
<dd>
|
|
425
|
+
Required lifecycle action. Must be <code>connect</code>, <code>send</code>, or
|
|
426
|
+
<code>close</code>.
|
|
427
|
+
</dd>
|
|
428
|
+
|
|
429
|
+
<dt>
|
|
430
|
+
connection_id
|
|
431
|
+
<span class="property-type">string</span>
|
|
432
|
+
</dt>
|
|
433
|
+
<dd>
|
|
434
|
+
Stable identifier for the websocket connection owned by this node instance.
|
|
435
|
+
</dd>
|
|
436
|
+
|
|
437
|
+
<dt class="optional">
|
|
438
|
+
event
|
|
439
|
+
<span class="property-type">object</span>
|
|
440
|
+
</dt>
|
|
441
|
+
<dd>
|
|
442
|
+
Required when <code>action</code> is <code>send</code>. Provide a Responses client event,
|
|
443
|
+
currently <code>{ "type": "response.create", ... }</code>.
|
|
444
|
+
</dd>
|
|
445
|
+
|
|
446
|
+
<dt class="optional">
|
|
447
|
+
code
|
|
448
|
+
<span class="property-type">integer</span>
|
|
449
|
+
</dt>
|
|
450
|
+
<dd>
|
|
451
|
+
Optional websocket close code used when <code>action</code> is <code>close</code>.
|
|
452
|
+
Defaults to <code>1000</code>.
|
|
453
|
+
</dd>
|
|
454
|
+
|
|
455
|
+
<dt class="optional">
|
|
456
|
+
reason
|
|
457
|
+
<span class="property-type">string</span>
|
|
458
|
+
</dt>
|
|
459
|
+
<dd>
|
|
460
|
+
Optional websocket close reason used when <code>action</code> is <code>close</code>.
|
|
461
|
+
Defaults to <code>OK</code>.
|
|
462
|
+
</dd>
|
|
244
463
|
|
|
245
464
|
</dl>
|
|
465
|
+
<p>
|
|
466
|
+
The websocket URL is derived from the configured <code>Service Host</code> API Base using the
|
|
467
|
+
same auth contract as the rest of this node, including custom auth headers and query-string auth.
|
|
468
|
+
</p>
|
|
246
469
|
|
|
247
470
|
</details>
|
|
248
|
-
</section>
|
|
471
|
+
</section>
|