MessageBuilder::withFunctionResponse( WordPressAiClientToolsDTOFunctionResponse $functionResponse ): self

In this article

Adds a function response to the message.

Parameters

$functionResponseWordPressAiClientToolsDTOFunctionResponserequired
The function response to add.

Return

self

Source

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

Changelog

VersionDescription
0.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.