fakellyh / bing-api-php
使用PHP进行简单的BingAI逆向工程
1.2.2
2024-04-14 19:41 UTC
Requires
- php: >=7.2.5
- guzzlehttp/guzzle: ^7.0
- ratchet/pawl: ^0.4.1
- react/event-loop: ^1.5
- symfony/event-dispatcher: ^6.3
README
欢迎使用Bing AI API,这是一个开源项目,旨在在不依赖cookie使用的情况下进行Bing AI的逆向工程。这一举措旨在提供一种透明且注重隐私的方法来与Bing AI的功能进行交互。
最新稳定版本和下载
安装
为了实现无缝集成,我们建议使用Composer
composer require fakellyh/bing-api-php
使用
要开始使用,请将自动加载器添加到您的项目中
require_once __DIR__.'/vendor/autoload.php';
现在,让我们通过一个简单的示例来演示如何使用Bing AI API。将以下PHP代码添加到您的项目中
use Fakell\Bing\Bing; use Fakell\Bing\Constant\Tones; // Include the Composer autoloader require __DIR__ . "/vendor/autoload.php"; // Create an instance of the Bing class $bing = new Bing; // Make a request to Bing AI $bing->ask("Hello world!", Tones::CREATIVE); // Display the response data $response = $bing->getResponse(); print_r($response);
响应示例
Array
(
[text] => Hello! 🌎
[author] => bot
[createdAt] => 2024-04-03T01:03:32.0349726+00:00
[timestamp] => 2024-04-03T01:03:32.0349726+00:00
[messageId] => 449951c5-76f4-46d2-becd-5212ee627ff3
[requestId] => 2fb1546f775cb27d171741ae9cd8195a
[offense] => None
[adaptiveCards] => Array
(
[0] => Array
(
[type] => AdaptiveCard
[version] => 1.0
[body] => Array
(
[0] => Array
(
[type] => TextBlock
[text] => Hello! 🌎
[wrap] => 1
)
)
)
)
[sourceAttributions] => Array
(
)
[feedback] => Array
(
[tag] =>
[updatedOn] =>
[type] => None
)
[contentOrigin] => DeepLeo
[suggestedResponses] => Array
(
[0] => Array
(
[text] => Hi there!
[author] => user
[createdAt] => 2024-04-03T01:03:33.3900432+00:00
[timestamp] => 2024-04-03T01:03:33.3900432+00:00
[messageId] => 02ecee3f-b62d-4db2-849c-700fc0b7ef90
[messageType] => Suggestion
[offense] => Unknown
[feedback] => Array
(
[tag] =>
[updatedOn] =>
[type] => None
)
[contentOrigin] => SuggestionChipsFalconService
)
[1] => Array
(
[text] => Greetings!
[author] => user
[createdAt] => 2024-04-03T01:03:33.390047+00:00
[timestamp] => 2024-04-03T01:03:33.390047+00:00
[messageId] => fd477fca-7a2c-4efe-bcf2-0138c19462b7
[messageType] => Suggestion
[offense] => Unknown
[feedback] => Array
(
[tag] =>
[updatedOn] =>
[type] => None
)
[contentOrigin] => SuggestionChipsFalconService
)
[2] => Array
(
[text] => What can I help you with?
[author] => user
[createdAt] => 2024-04-03T01:03:33.3900483+00:00
[timestamp] => 2024-04-03T01:03:33.3900483+00:00
[messageId] => 9ce7eaf7-739f-4e79-b57e-acb43872b4c7
[messageType] => Suggestion
[offense] => Unknown
[feedback] => Array
(
[tag] =>
[updatedOn] =>
[type] => None
)
[contentOrigin] => SuggestionChipsFalconService
)
)
)
支持
如果您遇到任何问题或认为此库存在问题,请随时创建一个问题,如果尚未存在的话。
作者
Nombana Fahendrena FIOMBONANTSOA
- 邮箱: fakellyh@gmail.com
- Facebook: fakellyh
许可证
本项目采用GPL-3.0许可证。