| description | page_type | month_change |
|---|---|---|
AI Actions functions allows you to embed AI Actions in your templates |
reference |
false |
AI Actions functions allows you to pass information about AI Actions to the Twig templates.
The ibexa_ai_config function loads the configuration of an Action Type with given identifier.
{% set ai_config = ibexa_ai_config('refine_text') %}
{% set ai_config2 = ibexa_ai_config('refine_text', { 'some': 'optional data' }) %}
<div class="hidden" data-ai-config-name="refine_text" data-ai-config="{{ ai_config|json_encode }}"></div>
You can use the ResolveActionConfigurationWidgetConfigEvent event to modify the configuration after it's been loaded. The optional data provided in the function call is available in the event object.