removed flow-config endpoint and resort to just prediction endpoint

This commit is contained in:
Henry
2023-05-10 01:06:53 +01:00
parent a1539edadf
commit 601b0b0f5b
8 changed files with 255 additions and 162 deletions
+7 -6
View File
@@ -353,6 +353,12 @@ export const resolveVariables = (reactFlowNodeData: INodeData, reactFlowNodes: I
return flowNodeData
}
/**
* Loop through each inputs and replace their value with override config values
* @param {INodeData} flowNodeData
* @param {ICommonObject} overrideConfig
* @returns {INodeData}
*/
export const replaceInputsWithConfig = (flowNodeData: INodeData, overrideConfig: ICommonObject) => {
const types = 'inputs'
@@ -560,12 +566,7 @@ export const findAvailableConfigs = (reactFlowNodes: IReactFlowNode[]) => {
for (const inputParam of flowNode.data.inputParams) {
let obj: IOverrideConfig
if (inputParam.type === 'password' || inputParam.type === 'options') {
obj = {
node: flowNode.data.label,
label: inputParam.label,
name: inputParam.name,
type: 'string'
}
continue
} else if (inputParam.type === 'file') {
obj = {
node: flowNode.data.label,