Skip to content

Commit

Permalink
Bugfix/Parse vars from overrideconfig to JSON (#3347)
Browse files Browse the repository at this point in the history
parse vars from overrideconfig to JSON
  • Loading branch information
HenryHengZJ authored Oct 13, 2024
1 parent d002096 commit 82da25d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/server/src/utils/buildChatflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions packages/server/src/utils/upsertVector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 82da25d

Please sign in to comment.