Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into feat/sources-in-react-widget

This commit is contained in:
utin-francis-peter
2024-10-28 17:44:50 +01:00
64 changed files with 1723 additions and 526 deletions

View File

@@ -458,7 +458,7 @@ export const DocsGPTWidget = ({
}
else {
const result = data.answer;
const result = data.answer ? data.answer : ''; //Fallback to an empty string if data.answer is undefined
const streamingResponse = queries[queries.length - 1].response ? queries[queries.length - 1].response : '';
const updatedQueries = [...queries];
updatedQueries[updatedQueries.length - 1].response = streamingResponse + result;