PHPackages                             martin3r/platform-ai-assistant - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. martin3r/platform-ai-assistant

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

martin3r/platform-ai-assistant
==============================

AI Assistant Service für die Platform

08PHP

Since Mar 6Pushed 2mo agoCompare

[ Source](https://github.com/martin3r-me/platform-ai-assistant)[ Packagist](https://packagist.org/packages/martin3r/platform-ai-assistant)[ RSS](/packages/martin3r-platform-ai-assistant/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AI Assistant Module
===================

[](#ai-assistant-module)

Installation
------------

[](#installation)

### 1. Environment Variables

[](#1-environment-variables)

Fügen Sie folgende Variablen zu Ihrer `.env` Datei hinzu:

```
# AI Assistant Module Configuration
AI_ASSISTANT_MODE=subdomain

# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_ORGANIZATION=your_openai_organization_id_here
OPENAI_BASE_URL=https://api.openai.com/v1

# Default Models
OPENAI_DEFAULT_MODEL=gpt-5-mini
OPENAI_FALLBACK_MODEL=gpt-4o-mini

# Model Sync Settings
OPENAI_SYNC_MODELS_ON_BOOT=false
OPENAI_SYNC_MODELS_SCHEDULE=daily

# Rate Limiting
OPENAI_MAX_REQUESTS_PER_MINUTE=60
OPENAI_MAX_TOKENS_PER_REQUEST=4000

# AI Assistant Module Settings
AI_ASSISTANT_MAX_MESSAGES_PER_THREAD=1000
AI_ASSISTANT_AUTO_ARCHIVE_AFTER_DAYS=30
```

### 2. Migrationen ausführen

[](#2-migrationen-ausführen)

```
php artisan migrate --path=platform/modules/ai-assistant/database/migrations
```

### 3. Modelle synchronisieren

[](#3-modelle-synchronisieren)

#### Mit Artisan Command (Empfohlen):

[](#mit-artisan-command-empfohlen)

```
# Synchronisiere globale Modelle (für alle Teams verfügbar)
php artisan ai-assistant:sync-models

# Dry Run (zeigt was synchronisiert würde, ohne es zu tun)
php artisan ai-assistant:sync-models --dry-run
```

#### Mit Tinker (Alternative):

[](#mit-tinker-alternative)

```
php artisan tinker
```

```
$modelService = app(\Platform\AiAssistant\Services\OpenAIModelService::class);
$result = $modelService->syncModels(auth()->user()->current_team_id, auth()->id());
dd($result);
```

Features
--------

[](#features)

- ✅ Dynamische OpenAI Modelle via API
- ✅ Automatische Deprecation von nicht verfügbaren Modellen
- ✅ Multi-Tenant Support
- ✅ Assistant &amp; Thread Management
- ✅ Integration mit anderen Modulen (Hatch, CRM, etc.)

Verwendung
----------

[](#verwendung)

### Assistant erstellen

[](#assistant-erstellen)

```
use Platform\AiAssistant\Models\AiAssistantAssistant;

$assistant = AiAssistantAssistant::create([
    'name' => 'Projekt-Intake Assistant',
    'instructions' => 'Du bist ein hilfreicher Assistent für Projekt-Intakes...',
    'model' => 'gpt-5-mini',
    'ownership_type' => 'team',
    'team_id' => auth()->user()->current_team_id,
    'created_by_user_id' => auth()->id(),
]);
```

### Thread erstellen

[](#thread-erstellen)

```
use Platform\AiAssistant\Models\AiAssistantThread;

$thread = AiAssistantThread::create([
    'assistant_id' => $assistant->id,
    'context_type' => 'Platform\\Hatch\\Models\\HatchProjectIntake',
    'context_id' => $projectIntake->id,
    'status' => 'active',
    'team_id' => auth()->user()->current_team_id,
    'created_by_user_id' => auth()->id(),
]);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/624263472b888cbddf2459047c1ab71dafd2a5875da576e3675b9c3584dad922?d=identicon)[martin3r](/maintainers/martin3r)

---

Top Contributors

[![martin3r-me](https://avatars.githubusercontent.com/u/187852765?v=4)](https://github.com/martin3r-me "martin3r-me (1 commits)")

### Embed Badge

![Health badge](/badges/martin3r-platform-ai-assistant/health.svg)

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

###  Alternatives

[monsoonconsulting/magento2-pwa

Adds a service worker to Magento2 to enable PWA features.

2322.9k](/packages/monsoonconsulting-magento2-pwa)[yii2mod/yii2-selectize

selectize.js wrapper for yii2

1730.7k1](/packages/yii2mod-yii2-selectize)

PHPackages © 2026

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