Skip to content

Commit

Permalink
llmconversation: correct to store response correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaguiar committed May 15, 2024
1 parent 01395c1 commit 406ca1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/include/inputFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,11 @@ var _inputFns = new Map([
__res = res.promptJSON(_res)
}
}
if (isDef(params.llmconversation)) io.writeFileJSON( params.llmconversation, res.getGPT().getConversation(), "" )
if (isDef(params.llmconversation)) {
var _conv = res.getGPT().getConversation()
_conv.push({ role: "assistant", content: stringify(__res, __, "") })
io.writeFileJSON( params.llmconversation, _conv, "" )
}

_$o(jsonParse(__res, __, __, isString(__res)), options)
}],
Expand Down

0 comments on commit 406ca1d

Please sign in to comment.