mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-07 05:30:31 -06:00
fix: parser error for empty json buffer
This commit is contained in:
@@ -46,6 +46,9 @@ class AIChatToolUseStream extends AIChatConstructStream {
|
||||
this.buffer += partial_json;
|
||||
}
|
||||
_end () {
|
||||
if ( this.buffer.trim() === '' ) {
|
||||
this.buffer = '{}';
|
||||
}
|
||||
const str = JSON.stringify(objectAssignTop({
|
||||
...this.contentBlock,
|
||||
input: JSON.parse(this.buffer),
|
||||
|
||||
Reference in New Issue
Block a user