PHPackages                             martink/chatgpt-site-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. martink/chatgpt-site-assistant

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

martink/chatgpt-site-assistant
==============================

A Laravel package to scan website routes and connect to ChatGPT as a smart assistant.

v1.0.4(1y ago)110MITPHPPHP ^8.1|^8.4

Since May 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/karadzinov/chatgpt-site-assistant)[ Packagist](https://packagist.org/packages/martink/chatgpt-site-assistant)[ RSS](/packages/martink-chatgpt-site-assistant/feed)WikiDiscussions main Synced 1mo ago

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

ChatGPT Site Assistant
======================

[](#chatgpt-site-assistant)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ed59f86757c4f2513ed8320317b21b1ebe2151a5decbcc9fc2bc54996796180d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617274696e6b2f636861746770742d736974652d617373697374616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/martink/chatgpt-site-assistant)[![Total Downloads](https://camo.githubusercontent.com/0ac69a52376406cc3414c490e094315fcb8b9985bb2f434a99b68cd0bc1d3832/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617274696e6b2f636861746770742d736974652d617373697374616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/martink/chatgpt-site-assistant)[![License](https://camo.githubusercontent.com/d5820eafc7f3e0af27d47a330ab6a0ee12e4f18eaa94e6528dc9fca04ae3056a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b617261647a696e6f762f636861746770742d736974652d617373697374616e742e7376673f7374796c653d666c61742d737175617265)](https://github.com/karadzinov/chatgpt-site-assistant/blob/main/LICENSE)

A Laravel package that scans your website's sitemap, extracts content, and connects to OpenAI's ChatGPT API to create an intelligent assistant that understands your site's actual content.

---

📦 Installation
--------------

[](#-installation)

```
composer require martink/chatgpt-site-assistant
```

Publish Config and Migrations

```
php artisan vendor:publish --tag=config
php artisan vendor:publish --tag=migrations
```

Then run:

```
php artisan migrate
```

⚙️ Configuration
----------------

[](#️-configuration)

Add your OpenAI API settings to your .env file:

```
OPENAI_API_KEY=your-openai-api-key
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_BASE_URI=https://api.openai.com/v1
OPENAI_MAX_RETRIES=3
OPENAI_TIMEOUT=30
OPENAI_SYSTEM_MESSAGE="You are a helpful assistant for a wedding planning website. Use the following context to answer the user's question."
```

You can override these in the published config file:

```
config/chatgpt-site-assistant.php
```

🧠 Usage
-------

[](#-usage)

Step 1: Scan Your Website's Sitemap

```
php artisan chatgpt:scan-sitemap http://localhost/sitemap.xml
```

This command will:

- Read your sitemap.
- Visit each route listed.
- Extract the textual content.
- Store it in the `website_contents` table for future use.

Step 2: Query the Assistant
---------------------------

[](#step-2-query-the-assistant)

Make a `POST` request to:

```
POST /api/chat
```

Example JSON body:

```
{
  "question": "What are your opening hours?"
}

```

The assistant uses your site's content to respond contextually via ChatGPT.

🧩 Components
------------

[](#-components)

- Service: ChatGptService.php – handles OpenAI API interaction.
- Command: `chatgpt:scan-sitemap` – crawls and stores your site's content.
- Controller: ChatGptController.php – exposes the assistant via API.
- Model: WebsiteContent.php – stores extracted text per URL.

### ✅ Laravel Compatibility

[](#-laravel-compatibility)

Laravel 8, 9, 10, and 12 supported.

PHP 8.0 – 8.4 supported.

### 📄 License

[](#-license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance49

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

375d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1df4c326f667674059508c1a8b1e21d2ee5a31dc3c5a8635e386d5f6faa2c92?d=identicon)[karadzinov](/maintainers/karadzinov)

---

Top Contributors

[![karadzinov](https://avatars.githubusercontent.com/u/7139106?v=4)](https://github.com/karadzinov "karadzinov (9 commits)")

### Embed Badge

![Health badge](/badges/martink-chatgpt-site-assistant/health.svg)

```
[![Health](https://phpackages.com/badges/martink-chatgpt-site-assistant/health.svg)](https://phpackages.com/packages/martink-chatgpt-site-assistant)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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