From 2e0c9e4e1314864f80617580c999e6c913d394ba Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 25 Apr 2023 22:17:22 -0400 Subject: [PATCH] Fix problem with datalake ingest when the response contains json forbidden chars that are not properly escaped. --- main.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.qml b/main.qml index d3d0ac96..f37734e2 100644 --- a/main.qml +++ b/main.qml @@ -368,11 +368,11 @@ Window { for (var i = 0; i < chatModel.count; i++) { var item = chatModel.get(i) var isResponse = item.name === qsTr("Response: ") - str += "{\"content\": \""; + str += "{\"content\": "; if (item.currentResponse) - str += LLM.response + "\"" + str += JSON.stringify(LLM.response) else - str += item.value + "\"" + str += JSON.stringify(item.value) str += ", \"role\": \"" + (isResponse ? "assistant" : "user") + "\""; if (isResponse && item.thumbsUpState !== item.thumbsDownState) str += ", \"rating\": \"" + (item.thumbsUpState ? "positive" : "negative") + "\"";