diff --git a/services/app/src/routes/(main)/project/[project_id]/chat-table/[table_id]/ChatMode.svelte b/services/app/src/routes/(main)/project/[project_id]/chat-table/[table_id]/ChatMode.svelte index 65d6454..c736d71 100644 --- a/services/app/src/routes/(main)/project/[project_id]/chat-table/[table_id]/ChatMode.svelte +++ b/services/app/src/routes/(main)/project/[project_id]/chat-table/[table_id]/ChatMode.svelte @@ -95,7 +95,7 @@ ] ]; - // generationStatus = true; + generationStatus = true; loadedStreams = Object.fromEntries( tableData.cols .map((col) => @@ -194,16 +194,18 @@ } } } else { - if ((parsedValue.choices[0].message.content ?? '').includes('\n')) { - loadedStreams[parsedValue.output_column_name] = [ - ...loadedStreams[parsedValue.output_column_name], - latestStreams[parsedValue.output_column_name] + - (parsedValue.choices[0]?.message?.content ?? '') - ]; - latestStreams[parsedValue.output_column_name] = ''; - } else { - latestStreams[parsedValue.output_column_name] += - parsedValue.choices[0]?.message?.content ?? ''; + if (loadedStreams[parsedValue.output_column_name]) { + if ((parsedValue.choices[0].message.content ?? '').includes('\n')) { + loadedStreams[parsedValue.output_column_name] = [ + ...loadedStreams[parsedValue.output_column_name], + latestStreams[parsedValue.output_column_name] + + (parsedValue.choices[0]?.message?.content ?? '') + ]; + latestStreams[parsedValue.output_column_name] = ''; + } else { + latestStreams[parsedValue.output_column_name] += + parsedValue.choices[0]?.message?.content ?? ''; + } } } } else {