class Blob implements Content

Traits

Properties

protected null|array<string, mixed> $meta from  HasMeta

Methods

void
setMeta(array|string $meta, mixed $value = null)

Set response metadata using an array or key-value pair.

from  HasMeta
array
mergeMeta(array $baseArray)

Merge metadata into the given response array.

from  HasMeta
__construct(string $content)

Create binary content.

array
toTool(Tool $tool)

Reject binary content in a tool response.

array
toPrompt(Prompt $prompt)

Reject binary content in a prompt response.

array
toResource(Resource $resource)

Format the binary content for a resource response.

string
__toString()

Get the raw content bytes.

array
toArray()

Convert the binary content to an array.

Details

in HasMeta at line 21
void setMeta(array|string $meta, mixed $value = null)

Set response metadata using an array or key-value pair.

Parameters

array|string $meta
mixed $value

Return Value

void

in HasMeta at line 46
array mergeMeta(array $baseArray)

Merge metadata into the given response array.

Parameters

array $baseArray

Return Value

array

at line 22
__construct(string $content)

Create binary content.

Parameters

string $content

at line 31
array toTool(Tool $tool)

Reject binary content in a tool response.

Parameters

Tool $tool

Return Value

array

at line 44
array toPrompt(Prompt $prompt)

Reject binary content in a prompt response.

Parameters

Prompt $prompt

Return Value

array

at line 57
array toResource(Resource $resource)

Format the binary content for a resource response.

Parameters

Resource $resource

Return Value

array

at line 69
string __toString()

Get the raw content bytes.

Return Value

string

at line 79
array toArray()

Convert the binary content to an array.

Return Value

array