Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class "LaravelBard" not found #8

Open
wpas81 opened this issue Jan 18, 2024 · 1 comment
Open

Class "LaravelBard" not found #8

wpas81 opened this issue Jan 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wpas81
Copy link

wpas81 commented Jan 18, 2024

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 wpas81 added the bug Something isn't working label Jan 18, 2024
@wpas81
Copy link
Author

wpas81 commented Jan 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants