定制 khaiphan/bard-reverse 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

khaiphan/bard-reverse

Composer 安装命令:

composer require khaiphan/bard-reverse

包简介

A PHP library for Reverse Google Bard AI

README 文档

README

Bard-AI-Reverse is a Composer package that allows you to interact with Google Bard AI using PHP code.

Language

Installation

Minimum PHP version required is 7.2.5

Use Composer to install the package.

Run the following command in the terminal:

composer require khaiphan/bard-reverse:dev-main

Usage

  1. First, you need to include the autoloader in your PHP code:
require 'vendor/autoload.php';
  1. Next, create an instance of the Bard class and provide cookie Google Bard AI:
use KhaiPhan\Google\Bard;

$bard = new Bard('__Secure-1PSID');

Make sure you replace '__Secure-1PSID' with the value of the __Secure-1PSID cookie obtained from the Google Bard AI website.

  1. Then, call the getAnswer() method to retrieve the response from Bard AI:
$answer = $bard->getAnswer('Hello');
  1. You can access the answer from Bard AI through the $answer['content'] variable. For example:
$content = $bard['content'];
echo $content;

License

This package is open-source and available under the MIT License.

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-04