Bugfix/Parse vars from overrideconfig to JSON (#3347)

parse vars from overrideconfig to JSON
This commit is contained in:
Henry Heng 2024-10-13 14:21:18 +01:00 committed by GitHub
parent d002096759
commit 82da25d763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -184,6 +184,9 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
fs.unlinkSync(file.path)
}
if (overrideConfig.vars && typeof overrideConfig.vars === 'string') {
overrideConfig.vars = JSON.parse(overrideConfig.vars)
}
incomingInput = {
question: req.body.question ?? 'hello',
overrideConfig

View File

@ -89,6 +89,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
fs.unlinkSync(file.path)
}
if (overrideConfig.vars && typeof overrideConfig.vars === 'string') {
overrideConfig.vars = JSON.parse(overrideConfig.vars)
}
incomingInput = {
question: req.body.question ?? 'hello',
overrideConfig,