fakellyh/bing-api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

fakellyh/bing-api-php

最新稳定版本:1.2.2

Composer 安装命令:

composer require fakellyh/bing-api-php

包简介

Simple reverse engineering to BingAI using PHP

README 文档

README

Welcome to the Bing AI API, an open-source project designed for reverse engineering Bing AI without relying on cookie usage. This initiative aims to provide a transparent and privacy-conscious approach to interact with Bing AI's functionalities.

Latest Stable Version and Downloads

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Installation

For seamless integration, we recommend using Composer:

composer require fakellyh/bing-api-php

Usage

To get started, add the autoloader to your project:

require_once __DIR__.'/vendor/autoload.php';

Now, let's demonstrate how to use the Bing AI API with a simple example. Add the following PHP code to your project:

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);

Response example :

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
                )

        )

)

Support

If you encounter any issues or believe there is a problem with this library, please feel free to open an issue if one doesn't already exist.

Author

Nombana Fahendrena FIOMBONANTSOA

License

This project is licensed under the GPL-3.0 license.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-03