Sfoglia il codice sorgente

fix: stringify object while exporting batch result to csv (#3481)

tags/0.6.3
sino 1 anno fa
parent
commit
22994a6d14
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6
    1
      web/app/components/share/text-generation/index.tsx

+ 6
- 1
web/app/components/share/text-generation/index.tsx Vedi File

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…
Annulla
Salva