We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2358d2 commit 484bb5cCopy full SHA for 484bb5c
src/backend/src/modules/puterai/lib/Streaming.js
@@ -46,6 +46,9 @@ class AIChatToolUseStream extends AIChatConstructStream {
46
this.buffer += partial_json;
47
}
48
_end () {
49
+ if ( this.buffer.trim() === '' ) {
50
+ this.buffer = '{}';
51
+ }
52
const str = JSON.stringify(objectAssignTop({
53
...this.contentBlock,
54
input: JSON.parse(this.buffer),
0 commit comments