mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-19 07:57:43 +08:00
fix: stringify object while exporting batch result to csv (#3481)
This commit is contained in:
parent
58cbda2950
commit
22994a6d14
@ -174,7 +174,12 @@ const TextGeneration: FC<IMainProps> = ({
|
|||||||
promptConfig?.prompt_variables.forEach((v) => {
|
promptConfig?.prompt_variables.forEach((v) => {
|
||||||
res[v.name] = inputs[v.key]
|
res[v.name] = inputs[v.key]
|
||||||
})
|
})
|
||||||
res[t('share.generation.completionResult')] = batchCompletionResLatest[task.id]
|
let result = batchCompletionResLatest[task.id]
|
||||||
|
// task might return multiple fields, should marshal object to string
|
||||||
|
if (typeof batchCompletionResLatest[task.id] === 'object')
|
||||||
|
result = JSON.stringify(result)
|
||||||
|
|
||||||
|
res[t('share.generation.completionResult')] = result
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
const checkBatchInputs = (data: string[][]) => {
|
const checkBatchInputs = (data: string[][]) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user