Notification
class Notification 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
__construct(string $method, array $params)
Create notification content.
array
string
__toString()
Get the notification method.
array
toArray()
Convert the notification 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.
in
HasMeta at line 46
array
mergeMeta(array $baseArray)
Merge metadata into the given response array.
at line 24
__construct(string $method, array $params)
Create notification content.
at line 33
array
toTool(Tool $tool)
Reject a notification used as tool result content.
at line 44
array
toPrompt(Prompt $prompt)
Reject a notification used as prompt result content.
at line 55
array
toResource(Resource $resource)
Reject a notification used as resource result content.
at line 64
string
__toString()
Get the notification method.
at line 74
array
toArray()
Convert the notification to an array.