We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bb7b3a commit 74f8a8aCopy full SHA for 74f8a8a
src/agent/src/Toolbox/StreamResult.php
@@ -32,13 +32,18 @@ public function getContent(): \Generator
32
foreach ($this->generator as $value) {
33
if ($value instanceof ToolCallResult) {
34
$innerResult = ($this->handleToolCallsCallback)($value, Message::ofAssistant($streamedResult));
35
-
+
36
// Propagate metadata from inner result to this result
37
foreach ($innerResult->getMetadata()->all() as $key => $metadataValue) {
38
$this->getMetadata()->add($key, $metadataValue);
39
}
40
41
- yield from $innerResult->getContent();
+ $content = $innerResult->getContent();
42
+ if (is_iterable($content)) {
43
+ yield from $content;
44
+ } else {
45
+ yield $content;
46
+ }
47
48
break;
49
0 commit comments