mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Fix problem with datalake ingest when the response contains json forbidden chars that are not properly escaped.
This commit is contained in:
parent
40c3733b6f
commit
2e0c9e4e13
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