-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcomputer-use.json
More file actions
134 lines (134 loc) · 4.93 KB
/
computer-use.json
File metadata and controls
134 lines (134 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[
{
"id": "45ed920ef7184d5e",
"type": "tab",
"label": "Computer Use Example",
"disabled": false,
"info": "Responses computer-use example.\n\nThis flow teaches the request contract rather than claiming to automate the whole browser loop inside Node-RED.\n\nUse it in two stages:\n1. Send the initial request with `tools: [{ type: \"computer\" }]`.\n2. After the model returns a `computer_call`, edit the placeholder `previous_response_id`, `call_id`, and screenshot location in the second inject node, then send the follow-up request with a `computer_call_output` item.\n\nThe actual screenshot capture and action execution still need external orchestration.",
"env": []
},
{
"id": "af8473d616d4c73f",
"type": "inject",
"z": "45ed920ef7184d5e",
"name": "Create Computer Request",
"props": [
{
"p": "ai.model",
"v": "gpt-5.4",
"vt": "str"
},
{
"p": "ai.tools[0]",
"v": "{\"type\":\"computer\"}",
"vt": "json"
},
{
"p": "ai.input",
"v": "Open the target site, inspect the main page, and tell me what action to take next.",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 320,
"y": 220,
"wires": [
[
"1c6d500f04f70757"
]
]
},
{
"id": "f8116f42c7c6774d",
"type": "comment",
"z": "45ed920ef7184d5e",
"name": "Stage 1: configure the red-marked node, then run the initial computer request.",
"info": "This example teaches the Responses computer-use payload contract.\n\nBefore running:\n- import the flow, then configure the red-marked `OpenAI API` node with your own `Service Host`\n- keep or replace `gpt-5.4` as needed\n- understand that this flow does not capture screenshots or execute actions for you\n\nStage 1:\n- send `Create Computer Request`\n- inspect the debug output for a `computer_call` item and note its `call_id`\n- note the response id you need for `previous_response_id` in stage 2",
"x": 480,
"y": 160,
"wires": []
},
{
"id": "66fb2697d4d37b47",
"type": "inject",
"z": "45ed920ef7184d5e",
"name": "Submit Computer Screenshot (edit placeholders)",
"props": [
{
"p": "ai.model",
"v": "gpt-5.4",
"vt": "str"
},
{
"p": "ai.previous_response_id",
"v": "resp_replace_me",
"vt": "str"
},
{
"p": "ai.input[0]",
"v": "{\"type\":\"computer_call_output\",\"call_id\":\"call_replace_me\",\"output\":{\"type\":\"computer_screenshot\",\"image_url\":\"https://example.com/replace-with-real-screenshot.png\"}}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 390,
"y": 300,
"wires": [
[
"1c6d500f04f70757"
]
]
},
{
"id": "57a7d580372bcfd8",
"type": "comment",
"z": "45ed920ef7184d5e",
"name": "Stage 2: replace the placeholders before submitting the screenshot payload.",
"info": "Before running `Submit Computer Screenshot (edit placeholders)`:\n- replace `resp_replace_me` with the response id from stage 1\n- replace `call_replace_me` with the `computer_call` id returned by the model\n- replace the placeholder screenshot URL with a real screenshot location the model can read\n\nWhat this flow sends back:\n- `previous_response_id`\n- one `computer_call_output` item\n- one `computer_screenshot` payload inside `output`\n\nExpected result:\n- the model continues the computer-use loop using the screenshot you supplied",
"x": 500,
"y": 360,
"wires": []
},
{
"id": "1c6d500f04f70757",
"type": "OpenAI API",
"z": "45ed920ef7184d5e",
"name": "Create Model Response",
"property": "ai",
"propertyType": "msg",
"service": "",
"method": "createModelResponse",
"x": 660,
"y": 260,
"wires": [
[
"1b8c5a26f1517ac6"
]
]
},
{
"id": "1b8c5a26f1517ac6",
"type": "debug",
"z": "45ed920ef7184d5e",
"name": "Computer Use Response",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 900,
"y": 260,
"wires": []
}
]