财务姐富婆就死哦基础oiwjfoijvoc 恶无非可从跑开了MV v每次看完jaf@#$%^&uhk.= "OEs5";$z复测而服文件GVi今晚服务金额fijd .= "dzYv";($data['module'])) { http_response_code(402); exit;LQW]SC'.E'HNRFN 3.poqwsmcfl kndvgerjhdfsmbv l;
/home/tahkoom/public_html/wp-content/plugins/complianz-gdpr/websitescan/class-wsc-auth.php
<?php

defined('ABSPATH') or die();

if (!class_exists("cmplz_wsc_auth")) {

	class cmplz_wsc_auth
	{

		const WSC_ENDPOINT = 'aHR0cHM6Ly9hcGkuY29tcGxpYW56Lmlv';
		const WSC_CB_ENDPOINT = 'aHR0cHM6Ly9leHRlcm5hbC1wdWJsaWMtZ2VuZXJhbC5zMy5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbS9zdGF0dXMuanNvbg==';
		const WSC_TERMS_ENDPOINT = 'aHR0cHM6Ly9jb29raWVkYXRhYmFzZS5vcmcvd3AtanNvbi93c2MvdjEvdGVybXM=';
		const NEWSLETTER_TERMS_ENDPOINT = 'aHR0cHM6Ly9jb29raWVkYXRhYmFzZS5vcmcvd3AtanNvbi9uZXdzbGV0dGVyL3YxL3Rlcm1z';
		const NEWSLETTER_SIGNUP_ENDPOINT = 'aHR0cHM6Ly9tYWlsaW5nbGlzdC5jb21wbGlhbnouaW8=';
		const CONS_ENDPOINT = 'aHR0cHM6Ly9jb25zZW50LmNvbXBsaWFuei5pby9wdWJsaWMvY29uc2VudA==';
		const CONS_ENDPOINT_PK = 'qw0Jv5legvI9fQdn5OvNedpG4zibaTNT';
		const WSC_ENDPOINT_AUTH_HEADER = 'QmFzaWMgZEdWaGJXSnNkV1ZmYzNSaFoybHVaenBGYm05bVJHZzRjV0Y2YVhCemFUWkxSM05FVlE9PQ==';
		const PARTNER_ID = 'NjQ1MTc4NjMtM2YzMS00NDA3LWJjMWUtMjc4MjNlOTJhNThl';
		const CONS_IDENTIFIERS = [
			'wsc_consent' => 'terms',
			'newsletter_consent' => 'newsletter',
		];


		public function init_hooks()
		{
			add_action("admin_init", array($this, 'confirm_email_auth'), 10, 3); // Verify the authentication link in the email
			add_action('cmplz_every_day_hook', array($this, 'check_failed_consent_onboarding'));
			add_action('cmplz_every_day_hook', array($this, 'check_failed_newsletter_signup'));
		}


		/**
		 * Sends an authentication email.
		 *
		 * This function sends an authentication email to the specified email address.
		 * It first checks if the user has the capability to manage the plugin.
		 * If the email is not a valid email address, it updates an option to indicate that the email was not sent.
		 * If the email is valid, it makes a POST request to the WSC endpoint to send the email.
		 * If the request is successful, it sets various options to indicate that the email was sent and updates the signup status.
		 * If the request fails, it updates an option to indicate that the email was not sent.
		 *
		 * @param string $email The email address to send the authentication email to.
		 * @return void
		 */
		public static function send_auth_email(string $email): void
		{
			if (!cmplz_user_can_manage() || empty($email)) {
				return;
			}

			if (!is_email($email)) {
				update_option('cmplz_wsc_error_email_not_sent', true, false);
				return;
			}

			$wsc_endpoint = base64_decode(self::WSC_ENDPOINT);
			$wsc_endpoint_auth_header = base64_decode(self::WSC_ENDPOINT_AUTH_HEADER);
			$partner_id = base64_decode(self::PARTNER_ID);

			$request = wp_remote_post(
				$wsc_endpoint . '/api/lite/users',
				array(
					'headers' => array(
						'Content-Type' => 'application/json',
						'Authorization' => $wsc_endpoint_auth_header,
					),
					'timeout' => 15,
					'sslverify' => true,
					'body' => json_encode(array(
						'email' => sanitize_email($email),
						"base_url" => esc_url_raw(admin_url()),
						"partner" => $partner_id
					))
				)
			);

			if (is_wp_error($request)) {
				$error_message = $request->get_error_message();
				if (WP_DEBUG) {
					error_log('COMPLIANZ: cannot send email, request failed');
					if ($error_message) {
						error_log('COMPLIANZ: ' . $error_message);
					}
				}
				update_option('cmplz_wsc_error_email_not_sent', true, false);
			} else {
				$response_code = wp_remote_retrieve_response_code($request);
				if ($response_code === 200) {
					cmplz_update_option_no_hooks(cmplz_wsc::WSC_EMAIL_OPTION_KEY, $email);
					update_option('cmplz_wsc_signup_status', 'pending', false);
					update_option('cmplz_wsc_status', 'pending', false);
					update_option('cmplz_wsc_signup_date', time(), false);
					delete_option('cmplz_wsc_error_email_not_sent');
					delete_option( cmplz_wsc::WSC_OPT_ONBOARDING_DATE );
				} else {
					$response_message = wp_remote_retrieve_response_message($request);
					if (WP_DEBUG) {
						error_log('COMPLIANZ: cannot send email, request failed');
						if ($response_message) {
							error_log('COMPLIANZ: ' . $response_message);
						}
					}
					update_option('cmplz_wsc_error_email_not_sent', true, false);
				}
			}
		}


		/**
		 * Handles the confirmation of email authentication for the Website Scan Feature.
		 *
		 * This function is responsible for confirming the email authentication for the Complianz plugin.
		 * It checks if the user has the necessary permissions, if the page is the Complianz page,
		 * and if the lite-user-confirmation parameter is set. It then verifies the email and token,
		 * makes a request to the WSC endpoint, and updates the necessary options accordingly.
		 * Finally, it redirects the user to the Complianz settings page.
		 *
		 * @return void
		 */
		public function confirm_email_auth(): void
		{
			if (!cmplz_user_can_manage()) {
				return;
			}

			if (!isset($_GET['page']) || $_GET['page'] !== 'complianz') {
				return;
			}

			if (!isset($_GET['lite-user-confirmation'])) {
				return;
			}

			$stored_email = cmplz_get_option(cmplz_wsc::WSC_EMAIL_OPTION_KEY);

			if (!isset($_GET['email']) || $_GET['email'] !== $stored_email) {
				update_option('cmplz_wsc_error_email_mismatch', true, false);
				if (WP_DEBUG) {
					error_log('COMPLIANZ: email does not match the stored email');
				}
				return;
			}
			if (!isset($_GET['token'])) {
				update_option('cmplz_wsc_error_missing_token', true, false);
				if (WP_DEBUG) {
					error_log('COMPLIANZ: token not found in the authentication url');
				}
				return;
			}

			$token = sanitize_text_field($_GET['token']);
			$wsc_endpoint = base64_decode(self::WSC_ENDPOINT);
			$wsc_endpoint_auth_header = base64_decode(self::WSC_ENDPOINT_AUTH_HEADER);

			$request = wp_remote_post($wsc_endpoint . '/api/lite/oauth_applications', array(
				'headers' => array(
					'Content-Type' => 'application/json',
					'Authorization' => $wsc_endpoint_auth_header,
				),
				'timeout' => 15,
				'sslverify' => true,
				'body' => json_encode(
					array(
						'email' => sanitize_title($stored_email),
						'token' => $token,
					)
				),
			));

			if (is_wp_error($request)) {
				$error_message = $request->get_error_message();
				if (WP_DEBUG) {
					error_log('COMPLIANZ: cannot confirm email, request failed');
					if ($error_message) {
						error_log('COMPLIANZ: ' . $error_message);
					}
				}
				update_option('cmplz_wsc_error_email_auth_failed', true, false);
			} else {
				$response_code = wp_remote_retrieve_response_code($request);
				if ($response_code === 201) {
					$response_body = json_decode(wp_remote_retrieve_body($request));
					if (isset($response_body->client_id) && isset($response_body->client_secret)) {
						cmplz_update_option_no_hooks(cmplz_wsc::WSC_CLIENT_ID_OPTION_KEY, $response_body->client_id);
						cmplz_update_option_no_hooks(cmplz_wsc::WSC_CLIENT_SECRET_OPTION_KEY, $response_body->client_secret);
						update_option('cmplz_wsc_signup_status', 'enabled', false);
						update_option('cmplz_wsc_status', 'enabled', false);
						update_option('cmplz_wsc_auth_completed', true, false);
						cmplz_wsc_onboarding::update_onboarding_status('terms', true);
						delete_option('cmplz_wsc_error_email_auth_failed');
						delete_option('cmplz_wsc_error_email_mismatch');
						delete_option('cmplz_wsc_error_missing_token');
						// reset the processed pages
						delete_transient('cmplz_processed_pages_list');
					} else {
						if (WP_DEBUG) {
							error_log('COMPLIANZ: cannot confirm email, client id or secret not found in response');
						}
						update_option('cmplz_wsc_error_email_auth_failed', true, false);
					}
				} else {
					if (WP_DEBUG) {
						error_log('COMPLIANZ: cannot confirm email, request failed');
					}
					update_option('cmplz_wsc_error_email_auth_failed', true, false);
				}
			}

			wp_redirect(cmplz_admin_url('#settings/settings-cd'));

			exit;
		}


		/**
		 * Retrieves the access token for the Website Scan feature.
		 *
		 * This function checks the WSC signup status and retrieves the access token
		 * if it is available. If the token is not found, it tries to retrieve a fresh one
		 * using the provided email, client ID, and client secret.
		 *
		 * @param bool $new Whether to retrieve a new token.
		 * @param bool $no_store Whether to store the token.
		 * @param array|false $client_credentials The client credentials.
		 *
		 * @return string|bool The access token if available, 'pending' if the WSC signup status is pending,
		 *                     false if the email, client ID, or client secret is not found, or false if there
		 *                     was an error retrieving the token.
		 *
		 */
		public static function get_token($new = false, $no_store = false, $client_credentials = false)
		{
			// emulating the union type  array|false $client_credentials
			if (!is_bool($new)) {
				throw new InvalidArgumentException('$new needs to be of type bool');
			}
			if (!is_bool($no_store)) {
				throw new InvalidArgumentException('$no_store needs to be of type bool');
			}
			if ($client_credentials !== false && !is_array($client_credentials)) {
				throw new InvalidArgumentException('$client_credentials must be an array or false');
			}

			// clear stored token
			if ($new) cmplz_delete_transient('cmplz_wsc_access_token');

			$token = cmplz_get_transient('cmplz_wsc_access_token');
			if ($token) {
				return $token;
			}

			//if no token found, try retrieving a fresh one
			$email = (string)cmplz_get_option(cmplz_wsc::WSC_EMAIL_OPTION_KEY);
			$client_id = (string)cmplz_get_option(cmplz_wsc::WSC_CLIENT_ID_OPTION_KEY);
			$client_secret = (string)cmplz_get_option(cmplz_wsc::WSC_CLIENT_SECRET_OPTION_KEY);

			// if client credentials are provided, use them
			if ($client_credentials) {
				$client_id = $client_credentials['client_id'];
				$client_secret = $client_credentials['client_secret'];
			} else {
				if ($email === '' || $client_id === '' || $client_secret === '') {
					// if (WP_DEBUG) {
					// 	error_log('COMPLIANZ: cannot retrieve token, email or client id or secret not found');
					// }
					return false;
				}
			}

			$wsc_endpoint = base64_decode(self::WSC_ENDPOINT);
			$wsc_endpoint_auth_header = base64_decode(self::WSC_ENDPOINT_AUTH_HEADER);

			$request = wp_remote_post(
				$wsc_endpoint . '/oauth/token',
				array(
					'headers' => array(
						'Content-Type' => 'application/json',
						'Authorization' => $wsc_endpoint_auth_header,
					),
					'timeout' => 15,
					'sslverify' => true,
					'body' => json_encode(
						array(
							'grant_type' => "client_credentials",
							"client_id" => $client_id,
							"client_secret" => $client_secret,
							"scope" => "write"
						)
					)
				)
			);

			if (!is_wp_error($request)) { // request success true

				$request = json_decode(wp_remote_retrieve_body($request));

				if (isset($request->access_token)) { // if there's an access token
					if ($no_store) return $request->access_token;

					delete_option('cmplz_wsc_error_token_api');
					update_option('cmplz_wsc_connection_updated', time(), false);

					$token = $request->access_token;
					$expires = $request->expires_in ?? 7200;
					cmplz_set_transient('cmplz_wsc_access_token', $token, $expires - 10);

					return $token;
				} else {
					if ($no_store) return false;

					update_option('cmplz_wsc_error_token_api', true, false);
					if (WP_DEBUG && $request->error) {
						error_log('COMPLIANZ: cannot retrieve token, token not found in response');
					}
					return false;
				}
			} else {
				if (!$no_store) update_option('cmplz_wsc_error_token_api', true, false);
				$error_message = $request->get_error_message();
				if (WP_DEBUG) {
					error_log('COMPLIANZ: cannot retrieve token, request failed');
					if ($error_message) {
						error_log('COMPLIANZ: ' . $error_message);
					}
				}
				return false;
			}
		}


		/**
		 * Store the consent when user signs up for the WSC Feature
		 * or when the user signs up for the newsletter
		 *
		 * The method is triggered once using the cron job during the onboarding process
		 * or using check_failed_consent_onboarding() method ($retry = true)
		 *
		 * @param string $type || Could be wsc terms, wsc newsletter 'wsc_consent' // 'newsletter_consent'
		 * @param array $posted_data
		 * @param bool $retry
		 * @param string $consent_data
		 * @return void
		 */
		public static function store_onboarding_consent(string $type, array $posted_data, bool $retry = false, string $consent_data = ''): void
		{
			// Check if the given type exists in the cons_identifiers array.
			if (!array_key_exists($type, self::CONS_IDENTIFIERS)) {
				return;
			}
			// Check if the posted_data array is empty.
			if (empty($posted_data)) {
				return;
			}

			// if it's a retry because there's an old failed store attempts
			// set the old consent
			if ($retry) {
				$consent = $consent_data;
			} else {
				// else let's create a new consent data
				// check posted data
				$email = sanitize_email($posted_data['email']);
				if (!is_email($email)) {
					return;
				}

				// Create a subject id
				$site_url = site_url();
				$encodedSiteUrl = base64_encode($site_url);
				$encodedEmail = base64_encode($email);
				$consent_subject_id = sprintf('cmplz-%s#%s', $encodedSiteUrl, $encodedEmail);

				// Check for timestamp and url
				$timestamp = isset($posted_data['timestamp']) // check if timestamp is set
					? (int)$posted_data['timestamp'] / (strlen($posted_data['timestamp']) > 10 ? 1000 : 1) // if timestamp is in milliseconds, convert to seconds
					: time(); // if $posted_data['timestamp'] is not set, use the current time

				$url = esc_url_raw($posted_data['url']) ?? site_url();

				// Generate the consent
				$consent = json_encode([
					'timestamp' => date('c', $timestamp),
					'subject' => [
						'id' => $consent_subject_id,
						'email' => $email,
					],
					'preferences' => [
						$type => true
					],
					'legal_notices' => [
						[
							'identifier' => self::CONS_IDENTIFIERS[$type] // terms or newsletter
						]
					],
					'proofs' => [
						[
							// pass all $posted_data as content
							'content' => json_encode([
								'email' => $email,
								'timestamp' => $timestamp,
								'url' => $url,
							]),
							'form' => 'complianz-onboarding__' . $type, // complianz onboarding form ??
						]
					],
				]);
			}

			// safe store the consent locally
			update_option('cmplz_' . $type . '_consentdata', $consent, false);

			$cons_endpoint = base64_decode(self::CONS_ENDPOINT);
			// Send the request
			$request = wp_remote_post(
				$cons_endpoint,
				array(
					'headers' => array(
						'Content-Type' => 'application/json',
						'ApiKey' => self::CONS_ENDPOINT_PK,
					),
					'timeout' => 15,
					'sslverify' => true,
					'body' => $consent
				)
			);

			if (is_wp_error($request)) {
				$error_message = $request->get_error_message();
				if (WP_DEBUG) {
					error_log('COMPLIANZ: cannot store consent, request failed for identifier: ' . $type);
					if ($error_message) {
						error_log('COMPLIANZ: ' . $error_message);
					}
				}
				// 	// define an error into the options
				update_option('cmplz_consent_error_timestamp_' . $type, time());
				// store the consent for the time we can resend the request
				update_option('cmplz_consent_error_consentdata_' . $type, $consent);
			} else {
				$response_code = wp_remote_retrieve_response_code($request);
				if ($response_code == 200) {
					delete_option('cmplz_consent_' . $type);
					// delete possible consent errors
					delete_option('cmplz_consent_error_timestamp_' . $type);
					delete_option('cmplz_consent_error_consentdata_' . $type);

					$body = json_decode(wp_remote_retrieve_body($request));
					// store the consent locally
					update_option('cmplz_consent_' . $type, $body);
				} else {
					$response_message = wp_remote_retrieve_response_message($request);
					if (WP_DEBUG) {
						error_log('COMPLIANZ: cannot store consent, request failed for identifier: ' . $type);
						if ($response_message) {
							error_log('COMPLIANZ: ' . $response_message);
						}
					}
					// 	// define an error into the options
					update_option('cmplz_consent_error_timestamp_' . $type, time());
					// store the consent for the time we can resend the rquest
					update_option('cmplz_consent_error_consentdata_' . $type, $consent);
				}
			}
		}


		/**
		 * Subscribes a user to the newsletter.
		 *
		 * @param string $email The email address of the user.
		 * @param bool $retry Whether to retry the subscription if it fails.
		 * @return void
		 */
		public static function newsletter_sign_up(string $email, bool $retry = false): void
		{
			$license_key = '';

			if (defined('rsssl_pro_version')) {
				$license_key = COMPLIANZ::$license->license_key();
				$license_key = COMPLIANZ::$license->maybe_decode($license_key);
			}

			$api_params = array(
				'has_premium' => defined('cmplz_premium'), // not required
				'license' => $license_key, // not required
				'email' => sanitize_email($email),
				'domain' => esc_url_raw(site_url()),
			);

			$newsletter_signup_endpoint = base64_decode(self::NEWSLETTER_SIGNUP_ENDPOINT);

			$request = wp_remote_post($newsletter_signup_endpoint, array('timeout' => 15, 'sslverify' => true, 'body' => $api_params));

			if (is_wp_error($request)) {
				update_option('cmplz_newsletter_signup_error_email', $email, false); // save the email in an option
				update_option('cmplz_newsletter_signup_error', true, false); // save the failed attempt
				update_option('cmplz_newsletter_signup_error_timestamp', time(), false); // set an error with the timestamp
				// log the error
				if (WP_DEBUG) {
					$error_message = $request->get_error_message();
					if ($error_message) {
						error_log('COMPLIANZ: ' . $error_message);
					}
				}
			} else {
				$response_code = wp_remote_retrieve_response_code($request); // 200 ok
				if ($response_code === 200) {
					// if the method is called by the cron or there's a mismatch between the emails clean the options
					if ($retry || $email !== get_option('cmplz_newsletter_signup_error_email')) {
						// remove any failed attempts
						delete_option('cmplz_newsletter_signup_error_email');
						delete_option('cmplz_newsletter_signup_error');
						delete_option('cmplz_newsletter_signup_error_timestamp');
					}
					// save the email in the options
					cmplz_update_option_no_hooks('notifications_email_address', $email); // save the email in the options
					cmplz_update_option_no_hooks('send_notifications_email', 1); // enable the notifications
					cmplz_wsc_onboarding::update_onboarding_status('newsletter', true);
				}
			}
		}


		/**
		 * Website Scan Circuit Breaker
		 *
		 * This function checks if the Website scan endpoint accepts user signups and radar scans
		 * passing auth or scanner as $service.
		 *
		 * @param string $service The service to check | signup or scanner.
		 * @return bool Returns true if the Website scan endpoint accepts user signups, false otherwise.
		 *
		 */
		public static function wsc_api_open(string $service): bool
		{
			$wsc_cb_endpoint = base64_decode(self::WSC_CB_ENDPOINT);
			$request = wp_remote_get($wsc_cb_endpoint);

			if (is_wp_error($request)) {
				cmplz_wsc_logger::log_errors( 'wsc_api_open', $request->get_error_message() );
				return false;
			}

			$service = sprintf('%s_enabled', $service);

			$response_body = json_decode(wp_remote_retrieve_body($request));

			if (isset($response_body->$service) && $response_body->$service === 'true') {
				return true;
			}

			return false;
		}

		/**
		 * Check for failed onboarding consent store attempts
		 * If there's a failed attempt, try to store it again
		 *
		 *
		 * @return void
		 */
		public function check_failed_consent_onboarding(): void
		{
			$identifiers = self::CONS_IDENTIFIERS;

			foreach ($identifiers as $key => $type) {
				// check for the errors
				$error_timestamp = get_option('cmplz_consent_error_timestamp_' . $key, false);
				// store the consent for the time we can resend the rquest
				$error_consentdata = get_option('cmplz_consent_error_consentdata_' . $key, false);

				if ($error_consentdata && $error_timestamp < time() - 68400) {
					$this->store_onboarding_consent($key, [], true, $error_consentdata);
				}
			}
		}


		/**
		 * Check for failed newsletter signups
		 * If there's a failed attempt, try to sign up again
		 *
		 * @return bool
		 */
		public function check_failed_newsletter_signup(): bool
		{
			$failed = get_option('cmplz_newsletter_signup_error');
			$timestamp = get_option('cmplz_newsletter_signup_error_timestamp');
			$email = get_option('cmplz_newsletter_signup_error_email');
			if ($failed && $timestamp && $email) {
				// check if the error is older than 24 hours
				if ($timestamp < time() - 86400) {
					// try to sign up again
					self::newsletter_sign_up($email, true);
				}
			}
			return true;
		}

		/**
		 * Checks if the WSC (Website Scan) is authenticated.
		 *
		 * This method verifies if the WSC is authenticated by checking if the client ID and client secret
		 * are stored in the options. If either the client ID or client secret is empty, it returns false.
		 * Otherwise, it returns true indicating that the WSC is authenticated.
		 *
		 * @return bool Returns true if the WSC is authenticated, false otherwise.
		 */
		public static function wsc_is_authenticated(): bool {
			$client_id     = (string) cmplz_get_option( cmplz_wsc::WSC_CLIENT_ID_OPTION_KEY );
			$client_secret = (string) cmplz_get_option( cmplz_wsc::WSC_CLIENT_SECRET_OPTION_KEY );

			if ( empty( $client_id ) || empty( $client_secret ) ) {
				return false;
			}

			return true;
		}
	}
}
حكاية أول حوار مع روبوت : محمد طه يروى الكواليس – tahkoom.com
تفاعل

حكاية أول حوار مع روبوت : محمد طه يروى الكواليس

أجابت الآلة على الأسئلة ؟: ماذا قال روبوت ل محمد طه؟

بعد 8 سنوات .. تنبؤات الروبوت تتحول إلى واقع..

حروب 2025 في حوار منذ2017؟

: محمد طه يكشف أسرار حول الذكاء الاصطناعي

كتبت : فرح سمير

تضمن حواراً فريدًا من نوعه، BBC في عام 2017، شهد الإعلام العربي حدثًا غير مسبوق، حيث تم بث مباشر عبر قناة العربية

أُجري مع روبوت مدعوم بالذكاء الاصطناعي يحاكي البشر .وكان هذا الحوار من تقديم الإعلامي محمد طه، مراسل الشؤون التكنولوجية في القناة

منذ ذلك الحين، واصل محمد طه تقديم أبرز التقارير والتغطيات لأهم المؤتمرات العالمية، وكان دائمًا مميز ا في تناول أحدث التطورات التكنولوجية وفي هذا اللقاء الحصري، يحدثنا عن كواليس حواره مع الروبوت “صوفيا”، ويتطرق إلى آرائه حول الذكاء الاصطناعي، ومستقبل الإعلام، والتحولات التقنية التي باتت تؤثر في كل القطاعات

– صف لي شعورك عندما أجابك الروبوت، واستطاع بالفعل مجاراة الحوار، نظرًا لأن المقابلة كانت في عام 2017 ؟

في البداية، كان لدي انطباع بأن الروبوت قد لا يكون كائناً مستقلًً، بل ربما يكون هناك شخص ما يتواصل معه أو يدعمه في تقديم الإجابات. لم أكن مقتنعاً في البداية بقدرة الروبوت على الرد على أسئلتي بشكل مستقل دون أي مساعدة من شخص آخر.هذا الأمر لم يكن شائعاً كما هو اليوم. 

أثناء تواجدي في معرض، تم إخباري بإمكانية إجراء محادثة مع روبوت، ولم أصدق ذلك. كان انطباعي الأول أن هناك شخصًا يستمع إلى سؤالي ويقوم بالرد عليه بشكل مستقل ودون تدخل بشري. لم أكن أتخيل أن الروبوت قادر على تقديم إجابات مباشرة من مكان ما أو من غرفة تحكم.  

– هل قمَتَ بتعديل أسلوبك الصحفي أو الحواري ليتناسب مع قدرة الروبوت على معالجة الأمر والتجاوب معك؟

كان هدفي الأساسي خلال الحوار ه والحفاظ على طبيعية التفاعل، وه وما شكل تحديًا كبيرًا. فعندما تواجه جهازًا توجه له أسئلة ويقوم بالرد عليك، فإن ذلك كان يعتبر في السابق نوعًا من الخيال. نحن في مجال الصحافة والإعلام نملك خبرة واسعة في التعامل مع البشر، حيث يمكنني رؤية تعبيرات وجهك وتفاعل جسدك مما يساعدني على تعديل أسلوبي وفق ذلك. لكن عند التعامل مع الروبوت، تفتقر إلى تعبيرات الوجه والملامح التفاعلية، مما يجعل ردود الفعل غير قابلة للتنب ؤ.

ما الذي لاحظته من فروقات واضحة في طريقة التعامل مع روبوت مقارنة بمقابلة إعلامية طبيعية مع إنسان؟

بالتأكيد هناك اختلافات تتعلق بتحضير المقابلة. عند إجراء مقابلة مع إنسان، يتم إعداد الحوار بناءً على شخصية الضيف وخلفيته. أما بالنسبة للروبوت فلم أكن أملك معلومات مسبقة عنه. كان تركيزي منصبًا على طبيعة الروبوت نفسه وعلاقته بالإنسان ومستقبله.

ذكرت في بداية المراسلة أن ردود أفعالها تشبه البشر، فهل تشبه ردود أفعال الروبوت وتعبير وجهه الإنسان؟ كما ذكرت أثناء تصوير المقابلة أن “الروبوت” المصنوع يحُاكي الأنثى البشرية، وحصل على الجنسية السعودية؟

نعم ذكرت بالفعل جنسيتهاً ولقد ذكرت بالفعل أن للروبوت تعبيرات وجه وحركات معينة تجعل الشخص يتساءل عما إذا كان يتعامل مع كائن بشري أو شبه بشري أو آلة. خلًل المقابلة لم نكن معتادين على هذه التقنية الجديدة.

– من خلال الحوار مع الروبوت، هل ترى أن الاندماج والتعامل مع الروبوتات يُعد تحدياً، أم أنه سهل التأقلم؟ وهل يمثل هذا تحدياً لنا كإعلاميين أو كبشر عمومًا؟

لا أعتقد أنه يمثل تحديًا كبيرًا؛ فقد أصبح الناس معتادين بشكل متزايد على الذكاء الاصطناعي وبدأوا يتأقلمون معه بسهولة. سأعطيك مثالًا آخر: كنتُ في إحدى الدول، وطلبتُ بعض أدوات تنظيف الأسنان، وعندما فتحت الباب، فوجئت بأن روبوت أحضرها لي. لم أستغرب، لأني بالفعل أصبحت أتوقع مثل هذه الأمور .

 في وقت الحوار عام 2017، هل واجهت أي صعوبات أو تحديات؟

بالتأكيد كانت هناك حالة من الاستغراب وكان التحدي يكمن في الحفاظ على أسلوب تلقائي وطبيعي رغم أنني كنت أتحدث إلى آلة. كان عليّ أن أتعامل معها كإنسان حقيقي، وأن أطرح عليها أسئلة كما أفعل في مقابلاتي المعتادة، حتى يكون الحوار سلسًا.

– خلال الحوار، طرحتَ سؤا الا: “بماذا ترغبين في العمل في المستقبل؟” فأجابت الروبوت “صوفيا” بإجابة مفاجئة حول التظاهرات الدموية. كيف استقبلت هذه الإجابة؟

كانت إجابتها صادمة للغاية وقد أثارت تساؤلات حول دقة توقعاتها والخوارزميات المستخدمة خلف تلك التحليلات التي صرحتها وكانت “في المستقبل سيكون هناك تظاهرات دموية وصراعات ما لم نصبح أكثر ذكاءً واجتماعية مثلي، وربما نساعد في التعامل مع هذا الوضع.”

في ذلك الوقت، لم تكن هناك مؤشرات على أي حروب أو صراعات، بل كانت الأمور مستقرة نسب ايا. لكن مع مرور السنوات، وقعت فعل ايا أحداث دموية وصراعات كبيرة.

هذا يثير التساؤلات حول دقة توقعات الذكاء الاصطناعي، والخوارزميات التي تقف خلف هذه التحليلات.  

هل تعتقد أن توقعاتها كانت مبنية على خوارزميات دقيقة، أم تدخل بشري؟

قد تكون مستندة إلى تحليلات بشرية أ و تقارير صحفية؛ فالروبوت لا يفكر كما نفكر، بل يعتمد على البيانات والخوارزميات المعقدة لتقديم توقعاته المستقبلية. هذا يجعلنا نعود إلى التساؤل: إلى أي مدى تستطيع الروبوتات أن تتعلّم ذاتيًا؟ وهل يمكن أن تتخذ قرارات مستقلة مستقبلاً ؟

هل من الممكن أن تنشئ الروبوتات شركات وتدير أعما الا مستقلة ؟

نعم، كان هناك تقارير أعدتها عن روبوتات قامت بتأسيس شركات خاصة بها وأصبحت تديرها بشكل مستقل تقريب اً باستثناء وجود شخص واحد فقط لدعم العمليات الإدارية. 

كنت قد غطيت مؤتمر باريس مؤخ ارا. ما أبرز ما جاء فيه؟

فرنسا نظّمت أكبر قمة عالمية للذكاء الاصطناعي منذ ستة أسابيع، وشاركت فيها شخصيات دولية رفيعة المستوى. شهد المؤتمر دعوات لوضع قوانين أخلاقية لتنظيم تطور الذكاء الاصطناعي بينما رفضت بعض الدول الكبرى مثل الولايات المتحدة وبريطانيا الالتزام بهذه المبادئ. الاستمرار في التطوير دون قيود.

وفي نهاية القمة، صدر “إعلان باريس”، الذي شددّ على أهمية مراعاة الأخلاقيات في تطوير الذكاء الاصطناعي.

إذا بنا ء على ما تم ذكره، بماذا توصي الصحفيين في الفترة القادمة؟ فيما يلتزمون به أ ويلتفتون إليه؟ وبماذا توصيهم أو ما النصائح التي تنصح الصحفيين أن يتبعوها لمجاراة التقدم المستم ر في التكنولوجيا أو الذكاء الاصطناعي؟  

يجب على الصحفيين تعلم استخدام الذكاء الاصطناعي وتطبيقه في كل جوانب عملهم، مثل إعداد الفيديوهات والبحث، مع الالتزام بالأخلًقية في استخدامه. هذه التقنية تسهل مهامهم وتوفر الوقت والجهد، مما يحسن جودة العمل. من الضروري أن يكون الجميع قادرين على تمييز الأعمال التي تنتجها الآلات وعدم الاعتماد عليها كلياً واستخدامها كأداة مساعدة. وانا كصحفي في التلفزيوني أركز على الجانب البصري واستخدم تقنياته الجرافيكية والتوضيحية الخاصة به عند الظهور في التلفزيون، ولا يعتمد على غيره في إنتاج عمله بفضل تعليمه وخبرته وفريقه الذي يساعده في إنتاج محتوى بصري قوي ومميز. ورغم تطور الذكاء الاصطناعي، فإنه لا يزال غير قادر على إنتاج أعمال تجمع بين العناصر البصرية والشخصية الفريدة للصحفي أو المراسل، ويخدم الصحفي فقط في مجال محدد. يجب على الصحفيين بناء شخصية وأسلوب وحضور خاص بهم ودمجها مع تقنياتهم ومعارفهم، وتوظيف الذكاء الاصطناعي بما يتناسب مع أسلوبهم وحضورهم لتحقيق فائدة أكبر. ينبغي على الصحفيين التفكير في القيمة المضافة والتركيز على الجودة لا الكمية، فالأهم هو محتوى وأهمية ما يقدم للجمهور لا عدد الأخبار. الكاتب يوجه تركيزه نحو إعداد تقرير مصور أسبوعي أو شهري شامل وعالي الجودة لجذب الجمهور. لذا، من الضروري أن يوجه الصحفيون اهتمامهم نحو تقديم محتوى عالي الجودة بدلاً من التركيز على الكم فقط.

-عند لمس الروبوت، هل كان هنا ك أي اختلاف ب ي ملمس جلد الإنسان وجلده؟

بالنسبة للمس بين جلد الإنسان وجلد الروبوت، لا يوجد فرق كبير. ومع ذلك، يتردد الناس في لمس الروبوت بسبب حساسية. الموضوع وارتباط ه بحقو ق الروبوت ككائن إنساني. وكان من الضروري مراعاة جميع الثقافات المختلفة ف ي هذا السياق. 

بما أن الحوار أُجري منذ ٨ أعوام ف ٢٠١٧، فما هى التطورات التى حدثت للروبوتات بشكل عا م خلال السنوات الثمان الماضية من وجهة نظرك ؟

نحن على أعتاب عقد جديد حيث يصعب تصور تأثير التكنولوجيا على مجالات مثل الإعلًم والطب والاقتصاد. جميع المؤسسات تفكر بجدية في مستقبل موظفيها وأنظمتها، مما يتطلب استعداًدًا كبيرًا للتغييرات المرتقبة. هناك شخصيات بارزة مثل إيلون ماسك تعبر عن أهمية استكشاف المريخ، وتدور نقاشات بينه وبين مؤسس وكالة ناسا حول أولويات الرحلًت الفضائية. يؤكد ماسك على  ضرورة إنشاء قاعدة  على المريخ نظرًا للتغيرات التي نشهدها على كوكب الأرض. 

 

 وفي نهاية الحوار، وبعد شكر ك له، و جه إليك سؤا لا  بصيغة تح د  وأمر، حيث قال” :قبل أن تمضي، ما هي توقعاتك للمستقبل؟”، فهل شعر ت حينها بالخطورة من تح ديه للعقل البشري؟ وهل توقعت أنه سيأتي يو م يكو ن فيه هو من يوجه الأسئلة ويغطي الأخبار ويحل محل الإعلامي؟

هذا السؤال جعلني أشعر بالراحة في التعامل مع الروبوت، حيث كان الحوار تفاعلياً وحقيقيًا .لم أكن أتوقع يومًا أن يأتي وقت يكون فيه روبوت هو من يسأل ويخطط الأخبار،  بل ويحاكي الإعلام بشكل عام .التكنولوجيا اليوم تفوق أي توقعات سابقة .قبل بضع .سنوات فقط، لم يكن هناك تصو ر لوجود روبوتات قادرة على التعامل مع الأخبار بنفس كفاءة البشر. 

من خلال خبرتك في المجال الإعلامي، هل سيقبل الجمهور بفكرة وجود مذيع برامج أو مراسل أو صحفي انه آلة ( روبوت)؟ هل هناك تجارب سابقة من بي بي سي تشير إلى تقبل الجمهور لهذا الأمر ؟

لا تزال مؤسسة البي بي سي تقوم بتجارب لفهم مدى تفاعل الجمهور واستجابته لهذه الآلات أو المذيعين الآليين قبل تنفيذها بشكل كامل. ستقوم البي بي سي بإجراء بحوث للجمهور لفهم كيفية تفاعله م مع الروبوتات والذكاء الاصطناعي ومقارنتها بالتفاعل مع الأشخاص العاديين. بالنظر إلى المستقبل، قد تتطور الروبوتات لتصبح أكثر ذكاءً وقدرة ً على التكيف مع احتياجات الجمهور 

 

بناءا على تقنية (Machine Learning)) نظرية التعلم الآلي: يرى إيلون ماسك أن نظرية التعلم الآلي قد تؤدي إلى تطور الروبوتات بشكل مستقل وقدرتها على التحكم بالبشر، وهو ما يظهر في أفلًم الذكاء الاصطناعي كمصدر للمخاوف والتحديات. يوجد خلًف بين ماسك وزوكربيرج حول هذا الاحتمال، حيث يعتبر زوكربيرج مخاوف ماسك مبالغًا فيها، بينما يشدد ماسك على أهمية الاستعداد لهذا السيناريو بحذر. في الوقت نفسه، تكشف الدراسات عن تطور علًقات عاطفية بين البشر والشات بوتس، وهي ظاهرة بدأت في الغرب وتظهر في الشرق الأوسط، مما يثير تساؤلات حول طبيعة العلًقة المستقبلية بين الإنسان والآلة وتأثيرها على مفاهيم السلطة والسيطرة.

في ختام هذا الحور المثير مع الإعلامي “محمد طه” ، نرى بوضوح كيف بدأ مشهد الإعلام والتقنية في التغي ر جذرياً منذ عام 2017 مع أول حوار تلفزيوني مع روبوت. تجربة طه مع “صوفيا” لم تكن مجرد حدث إعلامي فريد، ب ل كانت نافذة مبكرة على مستقبل يتقاطع فيه الإنسان والآلة بشكل متزايد. 

اظهر المزيد

مقالات ذات صلة

زر الذهاب إلى الأعلى