PHPackages                             intelligent-intern/chat-unified\_message-bundle - 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. intelligent-intern/chat-unified\_message-bundle

ActiveIntelligent-intern-bundle

intelligent-intern/chat-unified\_message-bundle
===============================================

Intelligent Intern bundle for UnifiedMessage integration

1.0.0(1y ago)09MITPHPPHP ^8.2

Since Mar 6Pushed 1y agoCompare

[ Source](https://github.com/Intelligent-Intern/chat-unified_message-bundle)[ Packagist](https://packagist.org/packages/intelligent-intern/chat-unified_message-bundle)[ RSS](/packages/intelligent-intern-chat-unified-message-bundle/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Intelligent Intern Chat Unified Message Service Bundle
======================================================

[](#intelligent-intern-chat-unified-message-service-bundle)

The `intelligent-intern/chat-unified_message-bundle` integrates chat messaging functionality with the Intelligent Intern Core Framework. This bundle allows you to handle unified messages (e.g., chat prompts) asynchronously via Messenger, process them with dynamic strategies (for example, using RAG or an agent network configured via Vault), and push responses to clients via Mercure.

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

[](#installation)

Install the bundle using Composer:

```
composer require intelligent-intern/chat-unified_message-bundle
```

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

[](#configuration)

### Vault Secrets

[](#vault-secrets)

Ensure the following secret is set in vault:

```
secret/data/data/chat:
  retryDelaySec: 15
```

This value controls the delay (in seconds) for retries when processing fails.

### Messenger

[](#messenger)

Make sure your Messenger component is configured to use a transport (e.g., RabbitMQ). For example, in your `config/packages/messenger.yaml`:

```
framework:
    messenger:
        default_bus: messenger.bus.default
        routing:
            'App\\Entity\\UnifiedMessage': rabbitmq
        transports:
            rabbitmq:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    exchange:
                        name: messages
                        type: direct
                    queues:
                        unified_message:
                            binding_keys: [ unified_message ]
                retry_strategy:
                    max_retries: 5
                    delay: 1000
                    multiplier: 2
                    max_delay: 60000
```

### Services

[](#services)

Ensure your services configuration automatically registers the strategy. For example:

```
services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: true

    IntelligentIntern\ChatUnifiedMessageBundle\Service\:
        resource: '../src/Service/*'
        public: true
        tags:
            - { name: 'unified_message.strategy' }
```

Usage
-----

[](#usage)

When a message is sent from the frontend, it is handled by a controller which creates and persists a UnifiedMessage entity and dispatches it asynchronously via Messenger. The actual processing is done by a strategy (e.g., `ChatUnifiedMessageServiceStrategy`), which validates the payload, builds a chat context, and pushes responses via Mercure.

Example controller:

```
