Closed joeybab3 closed 1 month ago
Guys, I managed to solve it here by following the steps in nalbantferhat's commit, but I made some changes only to the file vendor\google-gemini-php\client\src\Enums\ModelType.php and left it like this:
enum ModelType: string { case GEMINI_PRO = 'models/gemini-pro'; case GEMINI_PRO_1_0 = 'models/gemini-1.5-pro'; case GEMINI_PRO_1_0_LATEST = 'models/gemini-1.0-pro-latest'; case GEMINI_PRO_VISION = 'models/gemini-1.5-flash'; case EMBEDDING = 'models/embedding-001';
}
this worked for me
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')
Using the examples fails with the following error:
Error! Gemini API operation failed: operation=models/gemini-pro-vision:generateContent, status_code=404, response={ "error": { "code": 404, "message": "Gemini 1.0 Pro Vision has been deprecated on July 12, 2024. Consider switching to different model, for example gemini-1.5-flash.", "status": "NOT_FOUND" } }