WordPress\AiClient\Builders

PromptBuilder::withFunctionResponse │ public │ WP 0.1.0

Adds a function response to the current message.

Метод класса: PromptBuilder{}

Хуков нет.

Возвращает

self.

Использование

$PromptBuilder = new PromptBuilder();
$PromptBuilder->withFunctionResponse( $functionResponse ): self;
$functionResponse(FunctionResponse) (обязательный)
The function response.

Список изменений

С версии 0.1.0 Введена.

Код PromptBuilder::withFunctionResponse() WP 7.1.2

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