Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rpurinton/gemini-php

A PHP Library for Google Gemini AI
https://github.com/rpurinton/gemini-php

ai chatbot client composer gemini google llm open-source php

Last synced: 1 day ago
JSON representation

A PHP Library for Google Gemini AI

Awesome Lists containing this project

README

        

# Gemini PHP

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:

```bash
composer require rpurinton/gemini-php
```

## Usage

Please see [example.php](example.php) for a basic command-line example.

## Table of Contents

- [Project Documentation](docs/README.md)
- [Introduction](docs/introduction.md)
- [Installation](docs/installation.md)
- [Getting Started](docs/getting-started.md)
- [Configuration](docs/configuration.md)
- [Usage Examples](docs/usage-examples.md)
- [API Reference](docs/api-reference.md)
- [Troubleshooting](docs/troubleshooting.md)
- [FAQ](docs/faq.md)
- [Contributing](docs/contributing.md)
- [License](docs/license.md)

For more detailed usage instructions, please refer to the [Gemini PHP documentation](docs).

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.