Skip to content

Commit b19c67f

Browse files
committed
[Platform][OpenAI] Handle non-string values in StreamResult gracefully
1 parent a680dea commit b19c67f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/agent/src/Toolbox/StreamResult.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ public function getContent(): \Generator
5151
break;
5252
}
5353

54+
if (!\is_string($value)) {
55+
yield $value;
56+
break;
57+
}
58+
5459
$streamedResult .= $value;
5560

5661
yield $value;

0 commit comments

Comments
 (0)