承接 yunusasuroglu/laravel-gemini-ai 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yunusasuroglu/laravel-gemini-ai

最新稳定版本:v1.0

Composer 安装命令:

composer require yunusasuroglu/laravel-gemini-ai

包简介

A package to interact with Gemini API without routes

README 文档

README

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.

Installation

To install the package, run the following Composer command in your Laravel project:

composer require yunusasuroglu/laravel-gemini-ai

Controller

$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();
}

Requirements

  • PHP 8.0 or above
  • Composer

Contribute

  1. Fork this project.
  2. Create a new feature branch (feature/feature-adi).
  3. Commit your changes (git commit -m 'New feature added').
  4. Push the branch to master (git push origin feature/feature-adi).
  5. Open a Pull Request.

Licence

This project is licensed under the MIT License.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-21