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