WordPress\AiClient\Providers\OpenAiCompatibleImplementation

AbstractOpenAiCompatibleTextGenerationModel::throwIfNotSuccessfulprotectedWP 0.1.0

Throws an exception if the response is not successful.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->throwIfNotSuccessful( $response ): void;
$response(Response) (обязательный)
The HTTP response to check.

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

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

Код AbstractOpenAiCompatibleTextGenerationModel::throwIfNotSuccessful() WP 7.0.4

protected function throwIfNotSuccessful(Response $response): void
{
    /*
     * While this method only calls the utility method, it's important to have it here as a protected method so
     * that child classes can override it if needed.
     */
    ResponseUtil::throwIfNotSuccessful($response);
}