WordPress\AiClient\Builders
PromptBuilder::bindModelRequestOptions
Binds configured request options to the model if present and supported.
Request options are only applicable to API-based models that make HTTP requests.
Method of the class: PromptBuilder{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->bindModelRequestOptions( $model ): void;
- $model(ModelInterface) (required)
- The model to bind request options to.
Changelog
| Since 0.3.0 | Introduced. |
PromptBuilder::bindModelRequestOptions() PromptBuilder::bindModelRequestOptions code WP 7.0
private function bindModelRequestOptions(ModelInterface $model): void
{
if ($this->requestOptions !== null && $model instanceof ApiBasedModelInterface) {
$model->setRequestOptions($this->requestOptions);
}
}