WordPress\AiClient\Providers\OpenAiCompatibleImplementation
AbstractOpenAiCompatibleImageGenerationModel::createRequest
Creates a request object for the provider's API.
Implementations should use $this->getRequestOptions() to attach any configured request options to the Request.
Method of the class: AbstractOpenAiCompatibleImageGenerationModel{}
No Hooks.
Returns
Request. The request object.
Usage
// protected - for code of main (parent) or child class $result = $this->createRequest( $method, $path, $headers, $data ): Request;
- $method(HttpMethodEnum) (required)
- The HTTP method.
- $path(string) (required)
- The API endpoint path, relative to the base URI.
- $headers(array)
- .
Default:[] - $data
- .
Default:null
Changelog
| Since 0.1.0 | Introduced. |
AbstractOpenAiCompatibleImageGenerationModel::createRequest() AbstractOpenAiCompatibleImageGenerationModel::createRequest code WP 7.0
abstract protected function createRequest(HttpMethodEnum $method, string $path, array $headers = [], $data = null): Request;