api_client instanceof Generative_AI_API_Client ) { throw new RuntimeException( 'API client must be set in the constructor.' ); } return $this->api_client; } /** * Sets the API client instance. * * @since 0.7.0 * * @param Generative_AI_API_Client $api_client The API client instance. */ final protected function set_api_client( Generative_AI_API_Client $api_client ): void { $this->api_client = $api_client; } }