Prompt implements JsonSerializable
A prompt or prompt template that the server offers.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $arguments : array<string|int, mixed>|null
- $description : string|null
- $icons : array<string|int, mixed>|null
- $meta : array<string|int, mixed>|null
- $name : string
Methods
- __construct() : mixed
- fromArray() : self
-
jsonSerialize()
: Icon[], _meta?: array
}
Properties
$arguments read-only
public
array<string|int, mixed>|null
$arguments
= null
$description read-only
public
string|null
$description
= null
$icons read-only
public
array<string|int, mixed>|null
$icons
= null
$meta read-only
public
array<string|int, mixed>|null
$meta
= null
$name read-only
public
string
$name
Methods
__construct()
public
__construct(string $name[, string|null $description = null ][, array<string|int, PromptArgument>|null $arguments = null ][, array<string|int, Icon>|null $icons = null ][, array<string, mixed>|null $meta = null ]) : mixed
Parameters
- $name : string
-
the name of the prompt or prompt template
- $description : string|null = null
-
an optional description of what this prompt provides
- $arguments : array<string|int, PromptArgument>|null = null
-
A list of arguments for templating. Null if not a template.
- $icons : array<string|int, Icon>|null = null
-
optional icons representing the prompt
- $meta : array<string, mixed>|null = null
-
Optional metadata
fromArray()
public
static fromArray(PromptData $data) : self
Parameters
- $data : PromptData
Return values
selfjsonSerialize()
public
jsonSerialize() : Icon[], _meta?: array}