final | |
|---|---|
readonly | |
implements |
JsonSerializable, Arrayable<array{_meta?: array<string, mixed>, type: 'resource', resource: template-type<BlobResourceContents|TextResourceContents, ResourceContents, 'T'>, annotations?: template-type<Annotations, Arrayable, 'T'>}>, ContentBlock |
The contents of a resource, embedded into a prompt or tool call result. It is up to the client how best to render embedded resources for the benefit of the LLM and/or the user.
| Methods | ||
|---|---|---|
public
|
__construct(
BlobResourceContents|TextResourceContents $resource,
null|Annotations $annotations = null,
null|array<string, mixed> $meta = null,
)
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): template-type<self, Arrayable, 'T'>
|
# |
| Properties | |||
|---|---|---|---|
public
|
non-empty-string
|
$type
|
# |
public
|
BlobResourceContents|TextResourceContents
|
$resource
|
# |
public
|
null|Annotations
|
$annotations
|
# |
public
|
null|array<string, mixed>
|
$meta
|
# |