Skip to content

Commit 685e922

Browse files
authored
feat(i18n): update translations
1 parent 6a66466 commit 685e922

File tree

6 files changed

+422
-103
lines changed

6 files changed

+422
-103
lines changed

apps/docs/content/docs/de/yaml/blocks/loop.mdx

Lines changed: 79 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ type: object
1010
required:
1111
- type
1212
- name
13-
- inputs
1413
- connections
1514
properties:
1615
type:
@@ -22,21 +21,23 @@ properties:
2221
description: Display name for this loop block
2322
inputs:
2423
type: object
25-
required:
26-
- loopType
24+
description: Optional. If omitted, defaults will be applied.
2725
properties:
2826
loopType:
2927
type: string
3028
enum: [for, forEach]
3129
description: Type of loop to execute
30+
default: for
3231
iterations:
3332
type: number
3433
description: Number of iterations (for 'for' loops)
34+
default: 5
3535
minimum: 1
3636
maximum: 1000
3737
collection:
3838
type: string
3939
description: Collection to iterate over (for 'forEach' loops)
40+
default: ""
4041
maxConcurrency:
4142
type: number
4243
description: Maximum concurrent executions
@@ -45,40 +46,48 @@ properties:
4546
maximum: 10
4647
connections:
4748
type: object
48-
required:
49-
- loop
5049
properties:
50+
# Nested format (recommended)
5151
loop:
5252
type: object
53-
required:
54-
- start
5553
properties:
5654
start:
5755
type: string
5856
description: Target block ID to execute inside the loop
5957
end:
6058
type: string
6159
description: Target block ID for loop completion (optional)
60+
# Direct handle format (alternative)
61+
loop-start-source:
62+
type: string | string[]
63+
description: Target block ID to execute inside the loop (direct format)
64+
loop-end-source:
65+
type: string | string[]
66+
description: Target block ID for loop completion (direct format, optional)
6267
error:
6368
type: string
6469
description: Target block ID for error handling
70+
note: Use either the nested 'loop' format OR the direct 'loop-start-source' format, not both
6571
```
6672
6773
## Verbindungskonfiguration
6874
69-
Loop-Blöcke verwenden ein spezielles Verbindungsformat mit einem `loop`Abschnitt:
75+
Loop-Blöcke unterstützen zwei Verbindungsformate:
76+
77+
### Direktes Handle-Format (Alternative)
7078
7179
```yaml
7280
connections:
73-
loop:
74-
start: <string> # Target block ID to execute inside the loop
75-
end: <string> # Target block ID after loop completion (optional)
81+
loop-start-source: <string> # Target block ID to execute inside the loop
82+
loop-end-source: <string> # Target block ID after loop completion (optional)
7683
error: <string> # Target block ID for error handling (optional)
7784
```
7885
86+
Beide Formate funktionieren identisch. Verwenden Sie das Format, das Ihnen besser gefällt.
87+
7988
## Konfiguration von untergeordneten Blöcken
8089
81-
Blöcke innerhalb einer Schleife müssen ihre `parentId` auf die Loop-Block-ID setzen:
90+
Blöcke innerhalb einer Schleife müssen ihre `parentId` auf die Loop-Block-ID gesetzt haben. Die Eigenschaft `extent` wird automatisch auf `'parent'` gesetzt und muss nicht angegeben werden:
8291

8392
```yaml
8493
loop-1:
@@ -106,7 +115,7 @@ process-item:
106115

107116
## Beispiele
108117

109-
### For-Schleife (feste Iterationen)
118+
### For-Schleife (feste Anzahl von Iterationen)
110119

111120
```yaml
112121
countdown-loop:
@@ -227,7 +236,7 @@ store-analysis:
227236
};
228237
```
229238
230-
### Schleife mit paralleler Verarbeitung
239+
### Schleife für parallele Verarbeitung
231240
232241
```yaml
233242
parallel-processing-loop:
@@ -261,9 +270,62 @@ process-task:
261270
success: task-completed
262271
```
263272
273+
### Beispiel für direktes Handle-Format
274+
275+
Dieselbe Schleife kann mit dem direkten Handle-Format geschrieben werden:
276+
277+
```yaml
278+
my-loop:
279+
type: loop
280+
name: "Process Items"
281+
inputs:
282+
loopType: forEach
283+
collection: <start.items>
284+
connections:
285+
loop-start-source: process-item # Direct handle format
286+
loop-end-source: final-results # Direct handle format
287+
error: handle-error
288+
289+
process-item:
290+
type: agent
291+
name: "Process Item"
292+
parentId: my-loop
293+
inputs:
294+
systemPrompt: "Process this item"
295+
userPrompt: <loop.currentItem>
296+
model: gpt-4o
297+
apiKey: '{{OPENAI_API_KEY}}'
298+
```
299+
300+
### Minimales Schleifenbeispiel (mit Standardwerten)
301+
302+
Sie können den Abschnitt `inputs` vollständig weglassen, dann werden Standardwerte angewendet:
303+
304+
```yaml
305+
simple-loop:
306+
type: loop
307+
name: "Simple Loop"
308+
# No inputs section - defaults to loopType: 'for', iterations: 5
309+
connections:
310+
loop-start-source: process-step
311+
loop-end-source: complete
312+
313+
process-step:
314+
type: agent
315+
name: "Process Step"
316+
parentId: simple-loop
317+
inputs:
318+
systemPrompt: "Execute step"
319+
userPrompt: "Step <loop.index>"
320+
model: gpt-4o
321+
apiKey: '{{OPENAI_API_KEY}}'
322+
```
323+
324+
Diese Schleife führt standardmäßig 5 Iterationen aus.
325+
264326
## Schleifenvariablen
265327

266-
Innerhalb von untergeordneten Schleifenblöcken sind diese speziellen Variablen verfügbar:
328+
Innerhalb von Schleifenunterblöcken sind diese speziellen Variablen verfügbar:
267329

268330
```yaml
269331
# Available in all child blocks of the loop
@@ -290,6 +352,6 @@ final-processor:
290352
- Verwenden Sie forEach für die Verarbeitung von Sammlungen, for-Schleifen für feste Iterationen
291353
- Erwägen Sie die Verwendung von maxConcurrency für I/O-gebundene Operationen
292354
- Integrieren Sie Fehlerbehandlung für eine robuste Schleifenausführung
293-
- Verwenden Sie aussagekräftige Namen für Schleifen-Unterblöcke
355+
- Verwenden Sie aussagekräftige Namen für Schleifenunterblöcke
294356
- Testen Sie zuerst mit kleinen Sammlungen
295-
- Überwachen Sie die Ausführungszeit bei großen Sammlungen
357+
- Überwachen Sie die Ausführungszeit für große Sammlungen

apps/docs/content/docs/es/yaml/blocks/loop.mdx

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ type: object
1010
required:
1111
- type
1212
- name
13-
- inputs
1413
- connections
1514
properties:
1615
type:
@@ -22,21 +21,23 @@ properties:
2221
description: Display name for this loop block
2322
inputs:
2423
type: object
25-
required:
26-
- loopType
24+
description: Optional. If omitted, defaults will be applied.
2725
properties:
2826
loopType:
2927
type: string
3028
enum: [for, forEach]
3129
description: Type of loop to execute
30+
default: for
3231
iterations:
3332
type: number
3433
description: Number of iterations (for 'for' loops)
34+
default: 5
3535
minimum: 1
3636
maximum: 1000
3737
collection:
3838
type: string
3939
description: Collection to iterate over (for 'forEach' loops)
40+
default: ""
4041
maxConcurrency:
4142
type: number
4243
description: Maximum concurrent executions
@@ -45,40 +46,48 @@ properties:
4546
maximum: 10
4647
connections:
4748
type: object
48-
required:
49-
- loop
5049
properties:
50+
# Nested format (recommended)
5151
loop:
5252
type: object
53-
required:
54-
- start
5553
properties:
5654
start:
5755
type: string
5856
description: Target block ID to execute inside the loop
5957
end:
6058
type: string
6159
description: Target block ID for loop completion (optional)
60+
# Direct handle format (alternative)
61+
loop-start-source:
62+
type: string | string[]
63+
description: Target block ID to execute inside the loop (direct format)
64+
loop-end-source:
65+
type: string | string[]
66+
description: Target block ID for loop completion (direct format, optional)
6267
error:
6368
type: string
6469
description: Target block ID for error handling
70+
note: Use either the nested 'loop' format OR the direct 'loop-start-source' format, not both
6571
```
6672
6773
## Configuración de conexión
6874
69-
Los bloques Loop utilizan un formato de conexión especial con una sección `loop`:
75+
Los bloques de bucle admiten dos formatos de conexión:
76+
77+
### Formato de manejador directo (alternativo)
7078
7179
```yaml
7280
connections:
73-
loop:
74-
start: <string> # Target block ID to execute inside the loop
75-
end: <string> # Target block ID after loop completion (optional)
81+
loop-start-source: <string> # Target block ID to execute inside the loop
82+
loop-end-source: <string> # Target block ID after loop completion (optional)
7683
error: <string> # Target block ID for error handling (optional)
7784
```
7885
86+
Ambos formatos funcionan de manera idéntica. Usa el que prefieras.
87+
7988
## Configuración de bloques secundarios
8089
81-
Los bloques dentro de un bucle deben tener su `parentId` configurado con el ID del bloque loop:
90+
Los bloques dentro de un bucle deben tener su `parentId` configurado con el ID del bloque de bucle. La propiedad `extent` se establece automáticamente como `'parent'` y no necesita ser especificada:
8291

8392
```yaml
8493
loop-1:
@@ -261,6 +270,59 @@ process-task:
261270
success: task-completed
262271
```
263272
273+
### Ejemplo de formato de manejador directo
274+
275+
El mismo bucle puede escribirse usando el formato de manejador directo:
276+
277+
```yaml
278+
my-loop:
279+
type: loop
280+
name: "Process Items"
281+
inputs:
282+
loopType: forEach
283+
collection: <start.items>
284+
connections:
285+
loop-start-source: process-item # Direct handle format
286+
loop-end-source: final-results # Direct handle format
287+
error: handle-error
288+
289+
process-item:
290+
type: agent
291+
name: "Process Item"
292+
parentId: my-loop
293+
inputs:
294+
systemPrompt: "Process this item"
295+
userPrompt: <loop.currentItem>
296+
model: gpt-4o
297+
apiKey: '{{OPENAI_API_KEY}}'
298+
```
299+
300+
### Ejemplo de bucle mínimo (usando valores predeterminados)
301+
302+
Puedes omitir completamente la sección `inputs`, y se aplicarán los valores predeterminados:
303+
304+
```yaml
305+
simple-loop:
306+
type: loop
307+
name: "Simple Loop"
308+
# No inputs section - defaults to loopType: 'for', iterations: 5
309+
connections:
310+
loop-start-source: process-step
311+
loop-end-source: complete
312+
313+
process-step:
314+
type: agent
315+
name: "Process Step"
316+
parentId: simple-loop
317+
inputs:
318+
systemPrompt: "Execute step"
319+
userPrompt: "Step <loop.index>"
320+
model: gpt-4o
321+
apiKey: '{{OPENAI_API_KEY}}'
322+
```
323+
324+
Este bucle ejecutará 5 iteraciones por defecto.
325+
264326
## Variables de bucle
265327

266328
Dentro de los bloques secundarios del bucle, estas variables especiales están disponibles:
@@ -286,10 +348,10 @@ final-processor:
286348

287349
## Mejores prácticas
288350

289-
- Establece límites razonables de iteración para evitar tiempos de ejecución prolongados
351+
- Establece límites de iteración razonables para evitar tiempos de ejecución largos
290352
- Usa forEach para procesar colecciones, bucles for para iteraciones fijas
291353
- Considera usar maxConcurrency para operaciones limitadas por E/S
292-
- Incluye manejo de errores para una ejecución robusta de bucles
354+
- Incluye manejo de errores para una ejecución robusta del bucle
293355
- Usa nombres descriptivos para los bloques secundarios del bucle
294356
- Prueba primero con colecciones pequeñas
295357
- Monitorea el tiempo de ejecución para colecciones grandes

0 commit comments

Comments
 (0)