Skip to content

Commit c1ae4c9

Browse files
committed
Added basic StructuredContent
1 parent 2437849 commit c1ae4c9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Schema/Result/CallToolResult.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,7 @@ public static function fromArray(array $data): self
9797
continue;
9898
}
9999
$contents[] = match ($item->type ?? null) {
100-
'text' => TextContent::fromArray($item),
101-
'image' => ImageContent::fromArray($item),
102-
'audio' => AudioContent::fromArray($item),
103-
'resource' => EmbeddedResource::fromArray($item),
100+
'text', 'audio', 'image', 'resource' => $item,
104101
default => throw new InvalidArgumentException(\sprintf('Invalid content type in CallToolResult data: "%s".', $item['type'] ?? null)),
105102
};
106103
}

0 commit comments

Comments
 (0)