You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param string $name A human-readable name for this resource. This can be used by clients to populate UI elements.
48
-
* @param string|null $description A description of what this resource represents. This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
49
-
* @param string|null $mimeType the MIME type of this resource, if known
50
-
* @param Annotations|null $annotations optional annotations for the client
51
-
* @param int|null $size The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
47
+
* @param string $uri the URI of this resource
48
+
* @param string $name A human-readable name for this resource. This can be used by clients to populate UI elements.
49
+
* @param ?string $description A description of what this resource represents. This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
50
+
* @param ?string $mimeType the MIME type of this resource, if known
51
+
* @param ?Annotations $annotations optional annotations for the client
52
+
* @param ?int $size The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
53
+
* @param ?Icon[] $icons optional icons representing the resource
52
54
*
53
-
* This can be used by Hosts to display file sizes and estimate context window usage.
55
+
* This can be used by Hosts to display file sizes and estimate context window usage
54
56
*/
55
57
publicfunction__construct(
56
58
publicreadonlystring$uri,
@@ -59,6 +61,7 @@ public function __construct(
59
61
publicreadonly ?string$mimeType = null,
60
62
publicreadonly ?Annotations$annotations = null,
61
63
publicreadonly ?int$size = null,
64
+
publicreadonly ?array$icons = null,
62
65
) {
63
66
if (!preg_match(self::RESOURCE_NAME_PATTERN, $name)) {
64
67
thrownewInvalidArgumentException('Invalid resource name: must contain only alphanumeric characters, underscores, and hyphens.');
@@ -86,7 +89,8 @@ public static function fromArray(array $data): self
0 commit comments