PHPackages                             mgahed/ai - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mgahed/ai

ActiveLibrary

mgahed/ai
=========

This is my AI package that collecting several AI models from different providers

v1.2.0(1y ago)28MITPHPPHP ^8.1

Since Jul 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Mgahed/ai)[ Packagist](https://packagist.org/packages/mgahed/ai)[ Docs](https://github.com/mgahed/ai)[ RSS](/packages/mgahed-ai/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Mgahed AI Package
=================

[](#mgahed-ai-package)

 [![Latest Version](https://camo.githubusercontent.com/12e24dd95bde6dd6b23147cb03a0076b2a4826ae2ea8ffe8fdf8c99662f50108/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d4d67616865642d626c75652e737667)](https://mgahed.com) [![License](https://camo.githubusercontent.com/2b3b423df4fe05a977ba45e0f70cd59f2385f4f893987f525d1007e90147894d/68747470733a2f2f706f7365722e707567782e6f72672f6d67616865642f61692f6c6963656e7365)](https://github.com/Mgahed/ai/blob/master/LICENSE) [![Latest Version](https://camo.githubusercontent.com/6c3bbb3feb4b3a3ac34979ddd3176f6fdce70fdda5b709ecb18f604009c35d88/68747470733a2f2f706f7365722e707567782e6f72672f6d67616865642f61692f76)](https://packagist.org/packages/mgahed/ai) [![Total Downloads](https://camo.githubusercontent.com/0468d40988db6326db90a9765673615e518d3d049be009c838c8df16baeb8624/68747470733a2f2f706f7365722e707567782e6f72672f6d67616865642f61692f646f776e6c6f616473)](https://packagist.org/packages/mgahed/ai/stats) [![PHP Version Require](https://camo.githubusercontent.com/51615b44033f37e184940bb51dfe03fea714302375086f43c7cac11777a20d3c/687474703a2f2f706f7365722e707567782e6f72672f6d67616865642f61692f726571756972652f706870)](https://packagist.org/packages/mgahed/ai)

Introduction
------------

[](#introduction)

This package is simply use some AI models to help you get the best AI response for your text.

Used models
-----------

[](#used-models)

- Gemini pro
- Gemini 1.5
- Any other models of gemini that is not in beta version

Minimum Requirements
--------------------

[](#minimum-requirements)

DependencyVersionPHP&gt;= 8.1Laravel&gt;= 10.0Installation
------------

[](#installation)

```
composer require mgahed/ai

```

```
php artisan vendor:publish --tag=mgahed-ai-config

```

Configuration
-------------

[](#configuration)

See config file in `config/mgahed-ai.php`

```
return [
	// gemini api key
	'gemini' => [
		'api_key' => env('GEMINI_API_KEY'),
	],
];
```

You can add your gemini api key in your `.env` file

Usage
-----

[](#usage)

```
use Mgahed\ai\Http\Helpers\GeminiModel;

## Gemini pro model
$aiResponse = GeminiModel::proModel('What is the release date of first version of php?');

## Gemini 1.5 model
$aiResponse = GeminiModel::onePointFiveModel('What is the release date of first version of php?');

## Gemini any other model
$aiResponse = GeminiModel::generalModel('What is the release date of first version of php?', 'gemini-pro');
```

Supported Links
---------------

[](#supported-links)

- [Get Gemini AI key](https://www.geminiforwork.com/setup-api-keys/create-geminiai-api-key/)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ac4d6fc36e59659d2659b358348d3ecec8ea11317989ff989bf3b5954c44d12?d=identicon)[Mgahed](/maintainers/Mgahed)

---

Top Contributors

[![Mgahed](https://avatars.githubusercontent.com/u/41325933?v=4)](https://github.com/Mgahed "Mgahed (1 commits)")

---

Tags

aiGeminiartificial intelligenceChatGptmgahedmgahed.commgahedai

### Embed Badge

![Health badge](/badges/mgahed-ai/health.svg)

```
[![Health](https://phpackages.com/badges/mgahed-ai/health.svg)](https://phpackages.com/packages/mgahed-ai)
```

###  Alternatives

[smousss/laravel-globalize

Make Laravel projects translatable in a matter of seconds!

2266.3k](/packages/smousss-laravel-globalize)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
