We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8be5fc8 + 45f1f24 commit c1f007bCopy full SHA for c1f007b
1 file changed
Classes/Response/StreamChunkIterator.php
@@ -47,6 +47,13 @@ public function getIterator(): \Generator
47
yield $chunk;
48
continue;
49
}
50
+ // Symfony AI yields Stringable TextDelta objects, not raw strings
51
+ if ($chunk instanceof \Stringable) {
52
+ $text = (string)$chunk;
53
+ $this->accumulated .= $text;
54
+ yield $text;
55
+ continue;
56
+ }
57
// Capture TokenUsage objects from the stream
58
if (is_object($chunk) && method_exists($chunk, 'getPromptTokens')) {
59
$this->usage = new AiUsageStatistics(
0 commit comments