laravel-google-bard icon indicating copy to clipboard operation
laravel-google-bard copied to clipboard

Class "LaravelBard" not found

Open wpas81 opened this issue 1 year ago • 1 comments

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

wpas81 avatar Jan 18 '24 16:01 wpas81

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.'),

wpas81 avatar Jan 18 '24 16:01 wpas81