google-gemini-php / laravel

⚡️ Gemini PHP for Laravel is a community-maintained PHP API client that allows you to interact with the Gemini AI API.
MIT License
313 stars 32 forks source link

error with Gemini::geminiProVision() #17

Closed atmacoder closed 1 month ago

atmacoder commented 1 month ago

Gemini 1.0 Pro Vision has been deprecated on July 12, 2024. Consider switching to different model, for example gemini-1.5-flash.

levizwannah commented 1 month ago

After inspecting the code, you can use this method to select a specific model instead of using the others.

$model = Gemini::generativeModel('models/gemini-1.5-flash');
$response = $model->generate(...);
aydinfatih commented 1 month ago

I just released a new version.

Pro vision usage marked as deprecated. Also added geminiFlash method.

You can also use any model you want without depending on enums with the following method.

$client->generativeModel(model: 'models/gemini-1.5-flash-001')