PHPackages                             websystems/web-prompt-creator-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. websystems/web-prompt-creator-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

websystems/web-prompt-creator-bundle
====================================

OpenAI prompt creator for Symfony

0.0.14(1y ago)047[1 issues](https://github.com/websystemspl/WebPromptCreatorBundle/issues)MITVuePHP ^8.1

Since Mar 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/websystemspl/WebPromptCreatorBundle)[ Packagist](https://packagist.org/packages/websystems/web-prompt-creator-bundle)[ RSS](/packages/websystems-web-prompt-creator-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (13)Used By (0)

Web Prompt Creator
==================

[](#web-prompt-creator)

*for Symfony &amp; EasyAdmin*
-----------------------------

[](#for-symfony--easyadmin)

WPC is drag &amp; drop builder for OpenAi (or other) prompts.

[![webpromptcreator](https://private-user-images.githubusercontent.com/19324646/314198251-845a3a28-0cbf-4242-81c6-5c30f001ed4a.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU3MzU3MjksIm5iZiI6MTc3NTczNTQyOSwicGF0aCI6Ii8xOTMyNDY0Ni8zMTQxOTgyNTEtODQ1YTNhMjgtMGNiZi00MjQyLTgxYzYtNWMzMGYwMDFlZDRhLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA5VDExNTAyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE0NWEwMGFjYjVhZGFmNzFlNWUyM2RmNTAwMjk3MjcxYmYwMzExZGRkODRmZmQ4ODBlNThiOWFiMTE1ODUyNmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1ZWkSzsI6DQrHBdf2KbukNaxY0-TlS_oHNmmQNoq_Dc)](https://private-user-images.githubusercontent.com/19324646/314198251-845a3a28-0cbf-4242-81c6-5c30f001ed4a.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU3MzU3MjksIm5iZiI6MTc3NTczNTQyOSwicGF0aCI6Ii8xOTMyNDY0Ni8zMTQxOTgyNTEtODQ1YTNhMjgtMGNiZi00MjQyLTgxYzYtNWMzMGYwMDFlZDRhLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA5VDExNTAyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE0NWEwMGFjYjVhZGFmNzFlNWUyM2RmNTAwMjk3MjcxYmYwMzExZGRkODRmZmQ4ODBlNThiOWFiMTE1ODUyNmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1ZWkSzsI6DQrHBdf2KbukNaxY0-TlS_oHNmmQNoq_Dc)

By WPC you can design advanced prompts which can send several request before final response

Requirements
------------

[](#requirements)

- Symfony UX Vue

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

[](#installation)

Install WPC

```
composer require websystems/web-prompt-creator-bundle
```

Create service which will override input data $options will be used in input widget and values will be updated before send to AI

```
namespace App\Service;

use Websystems\WebPromptCreatorBundle\PromptInputOptions\PromptInputOptions;

class PromptInputOptionsService extends PromptInputOptions
{
    public function configureOptions(): array
    {
        $options = [
            'input_content' => '',
            'other_input_data' => '',
        ];

        return $options;
    }
}
```

Configure EasyAdmin crud controller and add service Add PromptField and set custom option named "input" with service options

```
    public function __construct(
        ...
        private PromptInputOptionsService $promptInputOptionsService,
    )
    {
    }
    ...
    public function configureFields(string $pageName): iterable
    {
        return [
            PromptField::new('prompt')
                ->setCustomOption("input", $this->promptInputOptionsService->getInputOptions())->hideOnIndex(),
```

Create override template for this field in templates/admin for example. web\_prompt\_creator.html.twig In {% block \_Prompt\_prompt\_widget %} Prompt is a entity name and \_prompt is entity property name arguments:

- element\_hidden - if *true* then block will show &lt;input type="hidden"... field, if *false* then &lt;textarea&gt;
- element\_value - field value
- element\_id - field id
- element\_name - field name
- input - "input" data from your service

```
{% block _Prompt_prompt_widget %}

{% endblock %}
```

Add form themes to crud controller

```
    public function configureCrud(Crud $crud): Crud
    {
        return $crud
            ->setFormThemes(['admin/web_prompt_creator.html.twig', '@EasyAdmin/crud/form_theme.html.twig'])
        ;
    }
```

Configure assets by adding js and css files

```
    ...
    use Websystems\WebPromptCreatorBundle\Asset\AssetPackage;
    ...
    public function __construct(
        ...
        protected RequestStack $requestStack,
    )
    {
    }
    ...
    public function configureAssets(Assets $assets): Assets
    {
        $assetPackage = new AssetPackage($this->requestStack);

        return $assets
            ->addJsFile($assetPackage->getUrl('437.js'))
            ->addJsFile($assetPackage->getUrl('runtime.js'))
            ->addJsFile($assetPackage->getUrl('builder.js'))
            ->addCssFile($assetPackage->getUrl('437.css'))
            ->addCssFile($assetPackage->getUrl('builder.css'))
        ;
    }
```

Usage
-----

[](#usage)

WPC creates JSON data which is stored in database. There are functions to handle this JSON and process to final response.

If you have an API class which is used to send requests to AI it must implements interface:

```
...
use Websystems\WebPromptCreatorBundle\AiInterface;

class OpenAi implements AiInterface
{
    public function supports($type): bool
    {
        return is_a($this, $type, true);
    }

    public function send(array $messages): ?array
    {
        ...

        return [
            'content' => $response['choices'][0]['message']['content'],
            'data' => $response,
        ];
    }
```

If you want to process for example in your controller, you must use dependency injection to get services:

```
    ...
    public function __construct(
        private OpenAi $openAi,
        private WebPromptCreator $webPromptCreator,
        private PromptInputOptionsService $promptInputOptionsService,
    )
    {
    }
```

And add important things to your webPromptCreator instance createRequests() - will send requests to ai and process all

```
        $json = $someRepository->find(...)
        $contentToProcess = "Some content to process";

        $this->webPromptCreator->setPromptData(json_decode($json, true));
        $this->webPromptCreator->setAiService($this->openAi);
        $this->promptInputOptionsService->updateOptionByKey('input_content', $contentToProcess);
        ...
        $this->webPromptCreator->setInputData($this->promptInputOptionsService);
        $this->webPromptCreator->createRequests();
```

To read final response

```
$this->webPromptCreator->getFinalResponse();
```

To read response by UID of request:

```
getResponseOfRequestByUid($uid)
```

To read response data by UID of request widget:

```
getResponseDataOfRequestByUid($uid)
```

```
getRequestCollection()
getPromptRequestCollectionAsArrayConversation(bool $withAnswers = false)
```

showDummyCoversation is like createRequests() but will not send requests to AI and create PromptRequestCollection with dummy data

```
showDummyCoversation(string $responseText = "This is a dummy response")
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Every ~8 days

Recently: every ~21 days

Total

12

Last Release

697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c1bc905fecfa1f86263d4ac8543360f09a4a1ed78547f18cd8b548199aa7056?d=identicon)[genosajd](/maintainers/genosajd)

---

Top Contributors

[![genosajd](https://avatars.githubusercontent.com/u/19324646?v=4)](https://github.com/genosajd "genosajd (22 commits)")

### Embed Badge

![Health badge](/badges/websystems-web-prompt-creator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/websystems-web-prompt-creator-bundle/health.svg)](https://phpackages.com/packages/websystems-web-prompt-creator-bundle)
```

PHPackages © 2026

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