make ai fallback true by default (#3380)
This commit is contained in:
@@ -49,7 +49,11 @@ import { WorkflowTemplates } from "../discover/WorkflowTemplates";
|
|||||||
const emptyWorkflowRequest: WorkflowCreateYAMLRequest = {
|
const emptyWorkflowRequest: WorkflowCreateYAMLRequest = {
|
||||||
title: "New Workflow",
|
title: "New Workflow",
|
||||||
description: "",
|
description: "",
|
||||||
workflow_definition: { blocks: [], parameters: [] },
|
ai_fallback: true,
|
||||||
|
workflow_definition: {
|
||||||
|
blocks: [],
|
||||||
|
parameters: [],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function Workflows() {
|
function Workflows() {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ function Debugger() {
|
|||||||
: null,
|
: null,
|
||||||
useScriptCache: workflow.generate_script,
|
useScriptCache: workflow.generate_script,
|
||||||
scriptCacheKey: workflow.cache_key,
|
scriptCacheKey: workflow.cache_key,
|
||||||
aiFallback: workflow.ai_fallback,
|
aiFallback: workflow.ai_fallback ?? true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const elements = getElements(
|
const elements = getElements(
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function WorkflowEditor() {
|
|||||||
: null,
|
: null,
|
||||||
useScriptCache: workflow.generate_script,
|
useScriptCache: workflow.generate_script,
|
||||||
scriptCacheKey: workflow.cache_key,
|
scriptCacheKey: workflow.cache_key,
|
||||||
aiFallback: workflow.ai_fallback,
|
aiFallback: workflow.ai_fallback ?? true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const elements = getElements(
|
const elements = getElements(
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
|
|||||||
extraHttpHeaders: data.withWorkflowSettings ? data.extraHttpHeaders : null,
|
extraHttpHeaders: data.withWorkflowSettings ? data.extraHttpHeaders : null,
|
||||||
useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false,
|
useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false,
|
||||||
scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null,
|
scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null,
|
||||||
aiFallback: data.withWorkflowSettings ? data.aiFallback : false,
|
aiFallback: data.withWorkflowSettings ? data.aiFallback : true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [facing, setFacing] = useState<"front" | "back">("front");
|
const [facing, setFacing] = useState<"front" | "back">("front");
|
||||||
|
|||||||
@@ -705,7 +705,7 @@ function getElements(
|
|||||||
editable,
|
editable,
|
||||||
useScriptCache: settings.useScriptCache,
|
useScriptCache: settings.useScriptCache,
|
||||||
scriptCacheKey: settings.scriptCacheKey,
|
scriptCacheKey: settings.scriptCacheKey,
|
||||||
aiFallback: settings.aiFallback ?? false,
|
aiFallback: settings.aiFallback ?? true,
|
||||||
label: "__start_block__",
|
label: "__start_block__",
|
||||||
showCode: false,
|
showCode: false,
|
||||||
}),
|
}),
|
||||||
@@ -1417,7 +1417,7 @@ function getWorkflowSettings(nodes: Array<AppNode>): WorkflowSettings {
|
|||||||
extraHttpHeaders: null,
|
extraHttpHeaders: null,
|
||||||
useScriptCache: false,
|
useScriptCache: false,
|
||||||
scriptCacheKey: null,
|
scriptCacheKey: null,
|
||||||
aiFallback: false,
|
aiFallback: true,
|
||||||
};
|
};
|
||||||
const startNodes = nodes.filter(isStartNode);
|
const startNodes = nodes.filter(isStartNode);
|
||||||
const startNodeWithWorkflowSettings = startNodes.find(
|
const startNodeWithWorkflowSettings = startNodes.find(
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const useWorkflowSave = () => {
|
|||||||
extra_http_headers: extraHttpHeaders,
|
extra_http_headers: extraHttpHeaders,
|
||||||
generate_script: saveData.settings.useScriptCache,
|
generate_script: saveData.settings.useScriptCache,
|
||||||
cache_key: normalizedKey,
|
cache_key: normalizedKey,
|
||||||
ai_fallback: saveData.settings.aiFallback ?? undefined,
|
ai_fallback: saveData.settings.aiFallback ?? true,
|
||||||
workflow_definition: {
|
workflow_definition: {
|
||||||
parameters: saveData.parameters,
|
parameters: saveData.parameters,
|
||||||
blocks: saveData.blocks,
|
blocks: saveData.blocks,
|
||||||
|
|||||||
Reference in New Issue
Block a user