PromptReference extends ElementReference
Tags
Table of Contents
Properties
- $completionProviders : array<string|int, mixed>
- $handler : Closure|array<string|int, mixed>|string
- $isManual : bool
- $prompt : Prompt
Methods
- __construct() : mixed
- formatResult() : array<string|int, PromptMessage>
- Formats the raw result of a prompt generator into an array of MCP PromptMessages.
Properties
$completionProviders read-only
public
array<string|int, mixed>
$completionProviders
= []
$handler read-only
public
Closure|array<string|int, mixed>|string
$handler
$isManual read-only
public
bool
$isManual
= false
$prompt read-only
public
Prompt
$prompt
Methods
__construct()
public
__construct(Prompt $prompt, Handler $handler[, bool $isManual = false ][, array<string, class-string|object> $completionProviders = [] ]) : mixed
Parameters
- $prompt : Prompt
- $handler : Handler
- $isManual : bool = false
- $completionProviders : array<string, class-string|object> = []
formatResult()
Formats the raw result of a prompt generator into an array of MCP PromptMessages.
public
formatResult(mixed $promptGenerationResult) : array<string|int, PromptMessage>
Parameters
- $promptGenerationResult : mixed
-
expected: array of message structures
Tags
Return values
array<string|int, PromptMessage> —array of PromptMessage objects