WordPress\AiClient\Builders

PromptBuilder::withFunctionResponsepublicWP 0.1.0

Adds a function response to the current message.

Method of the class: PromptBuilder{}

No Hooks.

Returns

self.

Usage

$PromptBuilder = new PromptBuilder();
$PromptBuilder->withFunctionResponse( $functionResponse ): self;
$functionResponse(FunctionResponse) (required)
The function response.

Changelog

Since 0.1.0 Introduced.

PromptBuilder::withFunctionResponse() code WP 7.0

public function withFunctionResponse(FunctionResponse $functionResponse): self
{
    $part = new MessagePart($functionResponse);
    $this->appendPartToMessages($part);
    return $this;
}