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

Trying to access array offset on value of type null #5

Open
cschalenborgh opened this issue Jul 14, 2023 · 3 comments
Open

Trying to access array offset on value of type null #5

cschalenborgh opened this issue Jul 14, 2023 · 3 comments

Comments

@cschalenborgh
Copy link

Hi,

I get the following error when I run a very simple get_answer() function:

ErrorException

 Trying to access array offset on value of type null

 at vendor/adityadees/laravel-google-bard/src/LaravelBard.php:135
   131▕             return ["content" => "Response Error: " . $resp . "."];
   132▕         }
   133▕         $parsed_answer = json_decode($resp_dict, true);
   134▕         $bard_answer = [
 ➜ 135▕             "content" => $parsed_answer[0][0],
   136▕             "conversation_id" => $parsed_answer[1][0],
   137▕             "response_id" => $parsed_answer[1][1],
   138▕             "factualityQueries" => $parsed_answer[3],
   139▕             "textQuery" => $parsed_answer[2][0] ?? "",
@adityadees
Copy link
Owner

hi, are you still get the error?

@MasterOfWeb
Copy link

I get the same error after installation and running the example.

@ldydak
Copy link

ldydak commented Dec 19, 2023

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants