laravel-google-bard
laravel-google-bard copied to clipboard
Trying to access array offset on value of type null
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] ?? "",
hi, are you still get the error?
I get the same error after installation and running the example.
Same here.