php bard api
1.0.1
❗ هذا الريبو أرشفة ❗
https://ai.google.dev/
حزمة تُرجع استجابة Google Bard من خلال API
composer require pj8912/php-bard-api
ApplicationStorage ، ستجد منسدلة cookieshttps://bard.google.com والتي ستظهر لك جميع ملفات تعريف الارتباط المستخدمة Name Value__Secure-1PSID و __Secure-1PSIDTS يجب تغيير قيمة
__Secure-1PSIDTSبشكل متكرر (تقوم Google بتغييره)
require_once ' vendor/autoload.php ' ;
use Pj8912 PhpBardApi Bard ;
//two keys are required which are two cookies values
$ _ENV [ ' BARD_API_KEY_X ' ] = " value of cookie '__Secure-1PSID' " ;
$ _ENV [ ' BARD_API_KEY_Y ' ] = " value of cookie '__Secure-1PSIDTS' "
$ bard = new Bard();
$ input_text = " Hello , Bard !"; // Input text for the conversation
$ result = $ bard -> get_answer ( $ input_text ); // Get the response from Bard
// bard reply
print( $ result [ ' choices ' ][ 0 ][ ' content ' ][ 0 ]);هذا المشروع مرخص بموجب ترخيص معهد ماساتشوستس للتكنولوجيا
يتحمل المستخدم جميع المسؤوليات القانونية المرتبطة باستخدام حزمة Bardapi. هذه الحزمة PHP تسهل الوصول بسهولة إلى Google Bard للمطورين. المستخدمون فقط مسؤولون عن إدارة البيانات واستخدام الحزمة بشكل مناسب. لمزيد من المعلومات ، يرجى الرجوع إلى وثيقة Google Bard الرسمية.