laravel-google-bard
laravel-google-bard copied to clipboard
Class "LaravelBard" not found
Hi
I tried setting up your Bard package but it fails with the eror "Class "LaravelBard" not found" i've tried importing it via
use LaravelBard; or use Bard;
but those aren't right :) Here's my controller *<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request; //use LaravelBard;
class testController extends Controller { public function __invoke() { dump('test');
$bard = (new LaravelBard())->get_answer('hoe laat is het');
dd($bard);
# to get the reply just access this array
$bard["content"];
# you can access others array like this
$bard["conversation_id"];
$bard["response_id"];
$bard["factualityQueries"];
$bard["textQuery"];
$bard["choices"];
}
}`**
Please advice
got it, it's use AdityaDees\LaravelBard\LaravelBard;
you may want to add this to the documentation :) Next issue: SNlM0e value not found in response. Check __Secure-1PSID value.
the token was filed in correctly in the config file 'bard_token' => env('BARD_TOKEN', 'my-token-with-an-dot-at-the-end.'),