I added Google's artificial intelligence to the site - Laravel & Gemini AI API

I coded a site powered by Google's AI and asked it questions in Azerbaijani.

Installation

Technologies I use are Laravel Framework and Gemini AI API.

First of all, we generate a token to be able to use the API by logging into aistudio.google.com.

You can even add custom features for this ai you add to your website if you want. For example, let him speak Azerbaijani, answer as a programmer or designer, etc.

Installe the composer package named google-gemini-php/laravel to our Laravel project

composer require google-gemini-php/laravel

Run the install command.

php artisan gemini:install

Thanks to this package, you don't have to write additional http requests and you can connect in seconds by simply adding the API token to your .env file. After the last command we ran, you will see the GEMINI_API_KEY line appear in our .env file.

I have shared all the codes on my GitHub profile, you can download it and take advantage of it.

In the next videos, we'll want to connect ChatGPT's OpenAI API to our Laravel project and send it custom commands to create an imaginary image.

GitHub

soltancode/laravel-gemini - don't forget to star :)

Video

Every cup of coffee you buy further enhance my creativity.

Buy me a coffeeThanks to everyone who supported me by buying me coffee!