Fix the failure to resolve variables for OverrideConfig(Json Object)
This commit is contained in:
parent
893100bc8a
commit
55b06f0581
|
|
@ -493,13 +493,14 @@ export const clearSessionMemory = async (
|
|||
* @returns {string}
|
||||
*/
|
||||
export const getVariableValue = (
|
||||
paramValue: string,
|
||||
paramValue: string | object,
|
||||
reactFlowNodes: IReactFlowNode[],
|
||||
question: string,
|
||||
chatHistory: IMessage[],
|
||||
isAcceptVariable = false
|
||||
) => {
|
||||
let returnVal = paramValue
|
||||
const isObject = typeof paramValue === 'object'
|
||||
let returnVal = isObject ? JSON.stringify(paramValue) : paramValue
|
||||
const variableStack = []
|
||||
const variableDict = {} as IVariableDict
|
||||
let startIdx = 0
|
||||
|
|
@ -562,7 +563,7 @@ export const getVariableValue = (
|
|||
})
|
||||
return returnVal
|
||||
}
|
||||
return returnVal
|
||||
return isObject ? JSON.parse(returnVal) : returnVal
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue