ihsandevs / edgegpt Goto Github PK
View Code? Open in Web Editor NEWBing AI Chatbot WebSocket API Wrapper for PHP
License: MIT License
Bing AI Chatbot WebSocket API Wrapper for PHP
License: MIT License
Help pls I have this error executing Example.php
Fatal error: Uncaught Spatie\Async\Output\ParallelError in /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Output/ParallelError.php:11 Stack trace: #0 /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Process/ParallelProcess.php(125): Spatie\Async\Output\ParallelError::fromException() #1 /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Process/ProcessCallbacks.php(54): Spatie\Async\Process\ParallelProcess->resolveErrorOutput() #2 /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Pool.php(232): Spatie\Async\Process\ParallelProcess->triggerError() #3 /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Pool.php(328): Spatie\Async\Pool->markAsFailed() #4 /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Pool.php(154): Spatie\Async\Pool->Spatie\Async{closure}() #5 /home/user/domains/mysite.com/public_html/bing/vendor/ihsandevs/php-edge-gpt/src/Chatbot.php(59): Spatie\Async\Pool->wait() #6 /home/user/domains/mysite.com/public_html/bing/index.php(10): Ihsandevs\EdgeGpt\Chatbot->ask() #7 {main} thrown in /home/user/domains/mysite.com/public_html/bing/vendor/spatie/async/src/Output/ParallelError.php on line 11
The name of the class is chatbot so the filename should be chatbot (not ChatBot)
Thanks
Hi Ishan,
I was trying to install you EdgeGPT API on a new server. This is what I have tried:
Installed the EdgeGPT: When composer show, I'll get: ihsandevs/php-edge-gpt 1.0.0 Bing AI Chatbot WebSocket API Wrapper for PHP. Its seems correct.
Then I created a test script:
_require(__DIR__ . '/vendor/autoload.php');
use Ihsandevs\EdgeGpt\Chatbot;
$bot = new Chatbot(__DIR__ . '/cookies.json');
// You can use the following conversation styles: CREATIVE, BALANCED, PRECISE. Or you can keep it empty.
$response = $bot->ask('What is a banana?', 'PRECISE');
echo $response->answer();_
When I try to run the script, I get this:
Fatal error: Uncaught Error: Class 'Ihsandevs\EdgeGpt\Chatbot' not found in //index.php:87 Stack trace: #0 {main} thrown in //index.php on line 87
Not sure why this isn't working. Any idea?
Regards,
K
Root package 'ihsandevs/php-edge-gpt' cannot require itself in its composer.json.
if I change the name of the project in json composer it is installed, however it throws the following error
Fatal error: Uncaught Error: Class "Ihsandevs\EdgeGpt\Chatbot" not found in...
Undefined array key "conversationSignature" in D:\xampp\htdocs\bing\vendor\ihsandevs\php-edge-gpt\src\ChatHub.php on line 48
"message": "Client error: GET https://edgeservices.bing.com/edgesvc/turing/conversation/create
resulted in a 403 Forbidden
response",
"exception": "GuzzleHttp\Exception\ClientException",
"file": "D:\phpstudy_pro\WWW\bing\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php",
"line": 113,
"trace": [
{
"file": "D:\phpstudy_pro\WWW\bing\vendor\guzzlehttp\guzzle\src\Middleware.php",
"line": 72,
"function": "create",
"class": "GuzzleHttp\Exception\RequestException",
"type": "::"
},
{
"file": "D:\phpstudy_pro\WWW\bing\vendor\guzzlehttp\promises\src\Promise.php",
"line": 204,
"function": "GuzzleHttp\{closure}",
"class": "GuzzleHttp\Middleware",
"type": "::"
},......
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.