rpurinton/gemini-php

A PHP client for the Gemini API.

0.1.8 2024-04-12 06:03 UTC

This package is auto-updated.

Last update: 2024-04-12 06:03:47 UTC


README

Gemini PHP is a PHP library for interacting with the Gemini AI platform. It provides a client for making requests to the Gemini API and a response class for handling the API responses.

Prerequisites

PHP 8.2+ Composer

  • Create a Google Cloud Project if you don't already have one.
  • Add the Vertex AI API to your project.
  • Create a Service Account in your project with Basic permissions.
  • Add an API Key and download the credentials JSON.
  • Save your credentials somewhere like /home/you/.google/myproject.json

Installation

To install Gemini PHP, you can use Composer. Run the following command:

composer require rpurinton/gemini-php

Usage

Please see example.php for a basic command-line example.

Table of Contents

For more detailed usage instructions, please refer to the Gemini PHP documentation.

License

This project is licensed under the MIT License. See the LICENSE file for details.