Skip to content

AI Features

JournalPHP integrates AI capabilities for automating moderation, enhancing content, and improving user interaction.

Setting Up AI

Admin Panel → AI Settings (/admin-panel/ai-settings):

SettingPurpose
API KeyDeepseek API Key
ModelModel to use (e.g., deepseek-chat)
Base URLDeepseek API base URL
EnabledGlobal enable/disable switch

If AI is not configured — all AI features are silently disabled, no errors occur.

Post Summaries (AI Summary)

Users with the applicable subscription level (feature post_summaries) can request a concise summary of a long post — with one button click.

How it works:

  1. User clicks "Summary" on the post page
  2. The platform sends the post text to the Deepseek API
  3. The response is displayed below the post

The summary prompt is configurable in Admin Panel → Summary Prompt (/admin-panel/post-summary-prompt).

Route: POST /posts/{post}/summary

AI Comment Bot

The bot acts as a configured platform user and responds when mentioned via @slug in a comment.

Admin Panel → Comment Bot (/admin-panel/chat-gpt-bot):

SettingPurpose
Bot userAccount that publishes bot replies
PromptInstructions for generating responses

Trigger: @slug mention of the bot in comment text (text after @slug is required).

Access requires a subscription with the chatgpt_comments feature. Without a subscription, the bot replies with a message linking to subscribe.

AI Text Moderation

When AI moderation is enabled, new posts and comments are automatically checked for policy violations.

Admin Panel → Content Moderation (/admin-panel/moderation-settings):

  • Enable AI moderation for posts
  • Enable AI moderation for comments
  • Configure actions on violation detection (send to moderation queue / auto-delete)

Manual moderation run:

bash
php artisan moderation:comments --sync

Image Moderation (Yandex Vision)

Images uploaded by users can be automatically checked for NSFW content via the Yandex Vision API.

Admin Panel → Image Moderation (/admin-panel/image-moderation-settings):

SettingPurpose
EnabledActivate image checking
Yandex Cloud API KeyAccess key
Folder IDYandex Cloud folder identifier
Confidence thresholdMinimum score to block

Released under the MIT License.