Skip to content

Commit 8200e9a

Browse files
authored
feat(i18n): update translations (#1569)
* feat(i18n): update translations * remove duplicate sections * fix typos
1 parent c6f6c9e commit 8200e9a

File tree

18 files changed

+4728
-500
lines changed

18 files changed

+4728
-500
lines changed

apps/docs/content/docs/de/sdks/python.mdx

Lines changed: 387 additions & 37 deletions
Large diffs are not rendered by default.

apps/docs/content/docs/de/sdks/typescript.mdx

Lines changed: 426 additions & 43 deletions
Large diffs are not rendered by default.

apps/docs/content/docs/de/triggers/api.mdx

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,92 @@ curl -X POST \
3838

3939
Erfolgreiche Antworten geben das serialisierte Ausführungsergebnis vom Executor zurück. Fehler zeigen Validierungs-, Authentifizierungs- oder Workflow-Fehler an.
4040

41-
## Ausgabe-Referenz
41+
## Streaming-Antworten
42+
43+
Aktivieren Sie Echtzeit-Streaming, um Workflow-Ausgaben zu erhalten, während sie zeichen-für-zeichen generiert werden. Dies ist nützlich, um KI-Antworten progressiv für Benutzer anzuzeigen.
44+
45+
### Anfrageparameter
46+
47+
Fügen Sie diese Parameter hinzu, um Streaming zu aktivieren:
48+
49+
- `stream` - Auf `true` setzen, um Server-Sent Events (SSE) Streaming zu aktivieren
50+
- `selectedOutputs` - Array von Block-Ausgaben zum Streamen (z.B. `["agent1.content"]`)
51+
52+
### Block-Ausgabeformat
53+
54+
Verwenden Sie das `blockName.attribute` Format, um anzugeben, welche Block-Ausgaben gestreamt werden sollen:
55+
- Format: `"blockName.attribute"` (z.B. Wenn Sie den Inhalt des Agent 1-Blocks streamen möchten, würden Sie `"agent1.content"` verwenden)
56+
- Blocknamen sind nicht case-sensitive und Leerzeichen werden ignoriert
57+
58+
### Beispielanfrage
59+
60+
```bash
61+
curl -X POST \
62+
https://sim.ai/api/workflows/WORKFLOW_ID/execute \
63+
-H 'Content-Type: application/json' \
64+
-H 'X-API-Key: YOUR_KEY' \
65+
-d '{
66+
"message": "Count to five",
67+
"stream": true,
68+
"selectedOutputs": ["agent1.content"]
69+
}'
70+
```
71+
72+
### Antwortformat
73+
74+
Streaming-Antworten verwenden das Server-Sent Events (SSE) Format:
75+
76+
```
77+
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":"One"}
78+
79+
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", two"}
80+
81+
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", three"}
82+
83+
data: {"event":"done","success":true,"output":{},"metadata":{"duration":610}}
84+
85+
data: [DONE]
86+
```
87+
88+
Jedes Ereignis enthält:
89+
- **Streaming-Chunks**: `{"blockId": "...", "chunk": "text"}` - Echtzeit-Text während er generiert wird
90+
- **Abschlussereignis**: `{"event": "done", ...}` - Ausführungsmetadaten und vollständige Ergebnisse
91+
- **Terminator**: `[DONE]` - Signalisiert das Ende des Streams
92+
93+
### Streaming mehrerer Blöcke
94+
95+
Wenn `selectedOutputs` mehrere Blöcke enthält, zeigt jeder Chunk an, welcher Block ihn erzeugt hat:
96+
97+
```bash
98+
curl -X POST \
99+
https://sim.ai/api/workflows/WORKFLOW_ID/execute \
100+
-H 'Content-Type: application/json' \
101+
-H 'X-API-Key: YOUR_KEY' \
102+
-d '{
103+
"message": "Process this request",
104+
"stream": true,
105+
"selectedOutputs": ["agent1.content", "agent2.content"]
106+
}'
107+
```
108+
109+
Das Feld `blockId` in jedem Chunk ermöglicht es Ihnen, die Ausgabe zum richtigen UI-Element zu leiten:
110+
111+
```
112+
data: {"blockId":"agent1-uuid","chunk":"Processing..."}
113+
114+
data: {"blockId":"agent2-uuid","chunk":"Analyzing..."}
115+
116+
data: {"blockId":"agent1-uuid","chunk":" complete"}
117+
```
118+
119+
## Ausgabereferenz
42120

43121
| Referenz | Beschreibung |
44122
|-----------|-------------|
45123
| `<api.field>` | Im Eingabeformat definiertes Feld |
46124
| `<api.input>` | Gesamter strukturierter Anfragekörper |
47125

48-
Wenn kein Eingabeformat definiert ist, stellt der Executor das rohe JSON nur unter `<api.input>` bereit.
126+
Wenn kein Eingabeformat definiert ist, stellt der Executor das rohe JSON nur unter `<api.input>` zur Verfügung.
49127

50128
<Callout type="warning">
51129
Ein Workflow kann nur einen API-Trigger enthalten. Veröffentlichen Sie nach Änderungen eine neue Bereitstellung, damit der Endpunkt aktuell bleibt.

apps/docs/content/docs/en/sdks/python.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class SimStudioError(Exception):
348348
import os
349349
from simstudio import SimStudioClient
350350

351-
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY
351+
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
352352

353353
def run_workflow():
354354
try:
@@ -386,7 +386,7 @@ Handle different types of errors that may occur during workflow execution:
386386
from simstudio import SimStudioClient, SimStudioError
387387
import os
388388

389-
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY")
389+
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
390390

391391
def execute_with_error_handling():
392392
try:
@@ -432,7 +432,7 @@ Execute multiple workflows efficiently:
432432
from simstudio import SimStudioClient
433433
import os
434434

435-
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY")
435+
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
436436

437437
def execute_workflows_batch(workflow_data_pairs):
438438
"""Execute multiple workflows with different input data."""
@@ -608,7 +608,7 @@ Execute workflows with real-time streaming responses:
608608
from simstudio import SimStudioClient
609609
import os
610610

611-
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY")
611+
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
612612

613613
def execute_with_streaming():
614614
"""Execute workflow with streaming enabled."""
@@ -659,7 +659,7 @@ def stream_workflow():
659659
'https://sim.ai/api/workflows/WORKFLOW_ID/execute',
660660
headers={
661661
'Content-Type': 'application/json',
662-
'X-API-Key': os.getenv('SIM_API_KEY
662+
'X-API-Key': os.getenv('SIM_API_KEY')
663663
},
664664
json={
665665
'message': 'Generate a story',

apps/docs/content/docs/en/sdks/typescript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,4 +992,4 @@ const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
992992

993993
## License
994994

995-
Apache-2.0
995+
Apache-2.0

0 commit comments

Comments
 (0)