A package to interact with Gemini API without routes
yunusasuroglu/laravel-gemini-ai is a Laravel package for a package to interact with gemini api without routes.
It currently has 1 GitHub stars and 2 downloads on Packagist (latest version v1.0).
Install it with composer require yunusasuroglu/laravel-gemini-ai.
Discover more Laravel packages by yunusasuroglu
or browse all Laravel packages to compare alternatives.
Last updated
This is a Laravel package to interact with Google's Gemini AI API. It allows you to send text to the API and receive the generated content in return.
To install the package, run the following Composer command in your Laravel project:
composer require yunusasuroglu/laravel-gemini-ai
$geminiService = new GeminiService();
$text = "The text to be sent to the API will come here";
$apiKey = env('GEMINI_API_KEY');
try {
$result = $geminiService->create($text, $apiKey);
echo $result['text']; // Prints the response returned by the API to the screen
} catch (\Exception $e) {
echo 'Error: ' . $e->getMessage();
}
feature/feature-adi).git commit -m 'New feature added').git push origin feature/feature-adi).This project is licensed under the MIT License.