Skip to content

Commit 9693a65

Browse files
add skip step execution
1 parent 37ba7a7 commit 9693a65

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

components/openai/actions/chat-file-search/chat-file-search.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ export default {
8989
optional: true,
9090
reloadProps: true,
9191
},
92+
skipThisStep: {
93+
type: "boolean",
94+
label: "Skip This Step",
95+
description: "Pass in a boolean custom expression to skip this step's execution at runtime",
96+
optional: true,
97+
default: false,
98+
},
9299
},
93100
additionalProps() {
94101
const {
@@ -148,6 +155,11 @@ export default {
148155
...common.methods,
149156
},
150157
async run({ $ }) {
158+
if (this.skipThisStep) {
159+
$.export("$summary", "Step execution skipped");
160+
return;
161+
}
162+
151163
const data = {
152164
model: this.modelId,
153165
input: this.input,

components/openai/actions/chat-functions/chat-functions.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ export default {
121121
optional: true,
122122
reloadProps: true,
123123
},
124+
skipThisStep: {
125+
type: "boolean",
126+
label: "Skip This Step",
127+
description: "Pass in a boolean custom expression to skip this step's execution at runtime",
128+
optional: true,
129+
default: false,
130+
},
124131
},
125132
additionalProps() {
126133
const {
@@ -169,6 +176,11 @@ export default {
169176
...common.methods,
170177
},
171178
async run({ $ }) {
179+
if (this.skipThisStep) {
180+
$.export("$summary", "Step execution skipped");
181+
return;
182+
}
183+
172184
const data = {
173185
model: this.modelId,
174186
input: this.input,

components/openai/actions/chat-web-search/chat-web-search.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ export default {
8585
optional: true,
8686
reloadProps: true,
8787
},
88+
skipThisStep: {
89+
type: "boolean",
90+
label: "Skip This Step",
91+
description: "Pass in a boolean custom expression to skip this step's execution at runtime",
92+
optional: true,
93+
default: false,
94+
},
8895
},
8996
additionalProps() {
9097
const {
@@ -139,6 +146,11 @@ export default {
139146
...common.methods,
140147
},
141148
async run({ $ }) {
149+
if (this.skipThisStep) {
150+
$.export("$summary", "Step execution skipped");
151+
return;
152+
}
153+
142154
const data = {
143155
model: this.modelId,
144156
input: this.input,

0 commit comments

Comments
 (0)