mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-06 09:20:33 +00:00
Fix problem with datalake ingest when the response contains json forbidden chars that are not properly escaped.
This commit is contained in:
parent
317a37a240
commit
e3ae98f975
6
main.qml
6
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") + "\"";
|
||||
|
Loading…
Reference in New Issue
Block a user