Skip to content

Commit ba753d4

Browse files
committed
Remove YAML service definition
1 parent c467ba8 commit ba753d4

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

docs/ai_actions/extend_ai_actions.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ See the code sample below, together with a matching service definition:
121121
```
122122

123123
``` yaml
124-
[[= include_file('code_samples/ai_actions/config/services.yaml', 28, 33) =]]
124+
[[= include_file('code_samples/ai_actions/config/services.yaml', 28, 33, remove_indent=True) =]]
125125
```
126126

127127
The `ibexa.ai.action.handler` tag is used by the `ActionHandlerResolverInterface` to find all the Action Handlers in the system.
@@ -141,7 +141,7 @@ The example handler uses the `system_prompt` option, which becomes part of the A
141141
```
142142

143143
``` yaml
144-
[[= include_file('code_samples/ai_actions/config/services.yaml', 34, 41) =]]
144+
[[= include_file('code_samples/ai_actions/config/services.yaml', 34, 41, remove_indent=True) =]]
145145
```
146146

147147
The created Form Type adds the `system_prompt` field to the Form.
@@ -158,7 +158,7 @@ You can create your own formatting by creating a class implementing the [Options
158158
The following service definition switches the options rendering to the other built-in options formatter, displaying the options as JSON.
159159

160160
``` yaml
161-
[[= include_file('code_samples/ai_actions/config/services.yaml', 64, 66) =]]
161+
[[= include_file('code_samples/ai_actions/config/services.yaml', 64, 66, remove_indent=True) =]]
162162
```
163163

164164
## Custom Action Type use case
@@ -184,7 +184,7 @@ The class needs to define following parameters of the Action Type:
184184
```
185185

186186
``` yaml
187-
[[= include_file('code_samples/ai_actions/config/services.yaml', 42, 50) =]]
187+
[[= include_file('code_samples/ai_actions/config/services.yaml', 42, 50, remove_indent=True) =]]
188188
```
189189

190190
The service definition introduces a custom `app.connector_ai.action.handler.audio_to_text` service tag to mark all the handlers capable of working with this Action Type.
@@ -222,7 +222,7 @@ The following example adds a checkbox field that indicates to the Action Handler
222222
```
223223

224224
``` yaml
225-
[[= include_file('code_samples/ai_actions/config/services.yaml', 51, 58) =]]
225+
[[= include_file('code_samples/ai_actions/config/services.yaml', 51, 58, remove_indent=True) =]]
226226
```
227227

228228
The built-in `Ibexa\Bundle\ConnectorAi\Form\FormMapper\ActionConfiguration\ActionTypeOptionsFormMapper` renders the Form Type in the back office when editing the Action Configuration for a specific Action Type (indicated by the `type` attribute of the `ibexa.connector_ai.action_configuration.form_mapper.action_type_options` service tag).
@@ -238,7 +238,7 @@ The Action Type options provided in the Action Context dictate whether the times
238238
```
239239

240240
``` yaml
241-
[[= include_file('code_samples/ai_actions/config/services.yaml', 59, 63) =]]
241+
[[= include_file('code_samples/ai_actions/config/services.yaml', 59, 63, remove_indent=True) =]]
242242
```
243243

244244
### Integrate with the REST API
@@ -256,7 +256,7 @@ Start by creating an Input Parser able to handle the `application/vnd.ibexa.api.
256256
```
257257

258258
``` yaml
259-
[[= include_file('code_samples/ai_actions/config/services.yaml', 68, 72) =]]
259+
[[= include_file('code_samples/ai_actions/config/services.yaml', 68, 72, remove_indent=True) =]]
260260
```
261261

262262
The `TranscribeAudioAction` is a value object holding the parsed request data.
@@ -283,7 +283,7 @@ The resolver is activated when `application/vnd.ibexa.api.ai.AudioText` media ty
283283
```
284284

285285
``` yaml
286-
[[= include_file('code_samples/ai_actions/config/services.yaml', 73, 76) =]]
286+
[[= include_file('code_samples/ai_actions/config/services.yaml', 73, 76, remove_indent=True) =]]
287287
```
288288

289289
- A visitor converting the response value object into a serialized REST response:
@@ -294,7 +294,7 @@ The resolver is activated when `application/vnd.ibexa.api.ai.AudioText` media ty
294294
```
295295

296296
``` yaml
297-
[[= include_file('code_samples/ai_actions/config/services.yaml', 77, 81) =]]
297+
[[= include_file('code_samples/ai_actions/config/services.yaml', 77, 81, remove_indent=True) =]]
298298
```
299299

300300
You can now execute a specific Action Configuration for the new custom Action Type through REST API by sending the following request:
@@ -331,8 +331,9 @@ This template embeds the AI component, but only if a dedicated `transcript` fiel
331331
```
332332

333333
And add it to the SiteAccess configuration for the `admin_group`:
334+
334335
``` yaml
335-
[[= include_file('code_samples/ai_actions/config/packages/ibexa_admin_ui.yaml') =]]
336+
[[= include_file('code_samples/ai_actions/config/packages/ibexa_admin_ui.yaml', remove_indent=True) =]]
336337
```
337338

338339
The configuration of the AI component takes the following parameters:

0 commit comments

Comments
 (0)