Skip to content

Commit 0ba3c95

Browse files
committed
Usage example
1 parent a0e2444 commit 0ba3c95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/ai_actions/extend_ai_actions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For example, you can create a handler that connects to a translation model and u
1414
You can execute AI Actions by using the [ActionServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-ActionServiceInterface.html) service, as in the following example:
1515

1616
``` php
17-
[[= include_file('code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php', 86, 105) =]]
17+
[[= include_file('code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php', 86, 105, remove_indent=True) =]]
1818
```
1919

2020
The `GenerateAltTextAction` is a built-in action that implements the [ActionInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-ActionInterface.html), takes an [Image](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-Action-DataType-Image.html) as an input, and generates the alternative text in the response.
@@ -77,7 +77,7 @@ See [Action Configuration Search Criteria reference](action_configuration_criter
7777
The following example creates a new Action Configuration:
7878

7979
``` php hl_lines="3 17"
80-
[[= include_file('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 46, 63) =]]
80+
[[= include_file('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 46, 63, remove_indent=True) =]]
8181
```
8282

8383
Actions Configurations are tied to a specific Action Type and are translatable.
@@ -88,7 +88,7 @@ Reuse existing Action Configurations to simplify the execution of AI Actions.
8888
You can pass one directly to the `ActionServiceInterface::execute()` method:
8989

9090
``` php hl_lines="7-8"
91-
[[= include_file('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 64, 72) =]]
91+
[[= include_file('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 64, 72, remove_indent=True) =]]
9292
```
9393

9494
The passed Action Configuration is only taken into account if the Action Context was not passed to the Action directly using the [ActionInterface::setActionContext()](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-ActionInterface.html#method_hasActionContext) method.

0 commit comments

Comments
 (0)