gemini-api-php / client

Google Gemini API PHP Client allows you to use the Gemini AI model
MIT License
118 stars 23 forks source link

[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) #28

Open EmreYilmazturk opened 7 months ago

EmreYilmazturk commented 7 months ago

<?php 
use GeminiAPI\Client;
use GeminiAPI\Resources\Parts\TextPart;

$client = new Client(''); //i entered the api here
$chat = $client->geminiPro()->startChat();

$response = $chat->sendMessage(new TextPart('Hello World in PHP'));
print $response->text();

$response = $chat->sendMessage(new TextPart('in Go'));
print $response->text();
?>```
erdemkose commented 7 months ago

Did you get this error for a specific prompt or was it a one time issue? Unfortunately, Google Gemini responds with a 500 error from time to time. There is nothing I can do.