Skip to content

Commit bb5cefa

Browse files
authored
docs: realtime streams v2 (#2673)
1 parent b8b1985 commit bb5cefa

File tree

8 files changed

+1314
-309
lines changed

8 files changed

+1314
-309
lines changed

docs/docs.json

Lines changed: 64 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
},
1111
"favicon": "/images/favicon.png",
1212
"contextual": {
13-
"options": ["copy", "view", "claude"]
13+
"options": [
14+
"copy",
15+
"view",
16+
"claude"
17+
]
1418
},
1519
"navigation": {
1620
"dropdowns": [
@@ -36,7 +40,11 @@
3640
"pages": [
3741
{
3842
"group": "Tasks",
39-
"pages": ["tasks/overview", "tasks/schemaTask", "tasks/scheduled"]
43+
"pages": [
44+
"tasks/overview",
45+
"tasks/schemaTask",
46+
"tasks/scheduled"
47+
]
4048
},
4149
"triggering",
4250
"runs",
@@ -51,7 +59,12 @@
5159
"errors-retrying",
5260
{
5361
"group": "Wait",
54-
"pages": ["wait", "wait-for", "wait-until", "wait-for-token"]
62+
"pages": [
63+
"wait",
64+
"wait-for",
65+
"wait-until",
66+
"wait-for-token"
67+
]
5568
},
5669
"queue-concurrency",
5770
"versioning",
@@ -60,6 +73,7 @@
6073
"runs/max-duration",
6174
"tags",
6275
"runs/metadata",
76+
"tasks/streams",
6377
"run-usage",
6478
"context",
6579
"runs/priority",
@@ -99,7 +113,9 @@
99113
},
100114
{
101115
"group": "Development",
102-
"pages": ["cli-dev"]
116+
"pages": [
117+
"cli-dev"
118+
]
103119
},
104120
{
105121
"group": "Deployment",
@@ -111,7 +127,10 @@
111127
"deployment/atomic-deployment",
112128
{
113129
"group": "Deployment integrations",
114-
"pages": ["github-integration", "vercel-integration"]
130+
"pages": [
131+
"github-integration",
132+
"vercel-integration"
133+
]
115134
}
116135
]
117136
},
@@ -167,11 +186,20 @@
167186
},
168187
{
169188
"group": "MCP Server",
170-
"pages": ["mcp-introduction", "mcp-tools", "mcp-agent-rules"]
189+
"pages": [
190+
"mcp-introduction",
191+
"mcp-tools",
192+
"mcp-agent-rules"
193+
]
171194
},
172195
{
173196
"group": "Using the Dashboard",
174-
"pages": ["run-tests", "troubleshooting-alerts", "replaying", "bulk-actions"]
197+
"pages": [
198+
"run-tests",
199+
"troubleshooting-alerts",
200+
"replaying",
201+
"bulk-actions"
202+
]
175203
},
176204
{
177205
"group": "Troubleshooting",
@@ -193,19 +221,30 @@
193221
"self-hosting/kubernetes",
194222
{
195223
"group": "Environment variables",
196-
"pages": ["self-hosting/env/webapp", "self-hosting/env/supervisor"]
224+
"pages": [
225+
"self-hosting/env/webapp",
226+
"self-hosting/env/supervisor"
227+
]
197228
},
198229
"open-source-self-hosting"
199230
]
200231
},
201-
202232
{
203233
"group": "Open source",
204-
"pages": ["open-source-contributing", "github-repo", "changelog", "roadmap"]
234+
"pages": [
235+
"open-source-contributing",
236+
"github-repo",
237+
"changelog",
238+
"roadmap"
239+
]
205240
},
206241
{
207242
"group": "Help",
208-
"pages": ["community", "help-slack", "help-email"]
243+
"pages": [
244+
"community",
245+
"help-slack",
246+
"help-email"
247+
]
209248
}
210249
]
211250
},
@@ -226,7 +265,10 @@
226265
},
227266
{
228267
"group": "Tasks API",
229-
"pages": ["management/tasks/trigger", "management/tasks/batch-trigger"]
268+
"pages": [
269+
"management/tasks/trigger",
270+
"management/tasks/batch-trigger"
271+
]
230272
},
231273
{
232274
"group": "Runs API",
@@ -272,7 +314,9 @@
272314
"groups": [
273315
{
274316
"group": "Introduction",
275-
"pages": ["guides/introduction"]
317+
"pages": [
318+
"guides/introduction"
319+
]
276320
},
277321
{
278322
"group": "Frameworks",
@@ -401,7 +445,9 @@
401445
},
402446
{
403447
"group": "Migration guides",
404-
"pages": ["migration-mergent"]
448+
"pages": [
449+
"migration-mergent"
450+
]
405451
},
406452
{
407453
"group": "Community packages",
@@ -422,7 +468,10 @@
422468
"href": "https://trigger.dev"
423469
},
424470
"api": {
425-
"openapi": ["openapi.yml", "v3-openapi.yaml"],
471+
"openapi": [
472+
"openapi.yml",
473+
"v3-openapi.yaml"
474+
],
426475
"playground": {
427476
"display": "simple"
428477
}

docs/guides/example-projects/batch-llm-evaluator.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ This demo is a full stack example that uses the following:
4444
- The `AnthropicEval` component: [src/components/evals/Anthropic.tsx](https://github.com/triggerdotdev/examples/blob/main/batch-llm-evaluator/src/components/evals/Anthropic.tsx)
4545
- The `XAIEval` component: [src/components/evals/XAI.tsx](https://github.com/triggerdotdev/examples/blob/main/batch-llm-evaluator/src/components/evals/XAI.tsx)
4646
- The `OpenAIEval` component: [src/components/evals/OpenAI.tsx](https://github.com/triggerdotdev/examples/blob/main/batch-llm-evaluator/src/components/evals/OpenAI.tsx)
47-
- Each of these components then uses [useRealtimeRunWithStreams](/realtime/react-hooks/streams) to subscribe to the different LLM responses.
47+
- Each of these components then uses [useRealtimeRunWithStreams](/realtime/react-hooks/streams#userealtimerunwithstreams) to subscribe to the different LLM responses.
48+
49+
<Note>
50+
This example uses the older `useRealtimeRunWithStreams` hook. For new projects, consider using the new [`useRealtimeStream`](/realtime/react-hooks/streams#userealtimestream-recommended) hook (SDK 4.1.0+) for a simpler API and better type safety with defined streams.
51+
</Note>
4852

4953
<RealtimeLearnMore />

docs/realtime/backend/overview.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ There are three main categories of functionality:
1414

1515
- **[Subscribe functions](/realtime/backend/subscribe)** - Subscribe to run updates using async iterators
1616
- **[Metadata](/realtime/backend/subscribe#subscribe-to-metadata-updates-from-your-tasks)** - Update and subscribe to run metadata in real-time
17-
- **[Streams](/realtime/backend/streams)** - Emit and consume real-time streaming data from your tasks
17+
- **[Streams](/realtime/backend/streams)** - Read and consume real-time streaming data from your tasks
18+
19+
<Note>
20+
To learn how to emit streams from your tasks, see our [Realtime Streams](/tasks/streams) documentation.
21+
</Note>
1822

1923
## Authentication
2024

0 commit comments

Comments
 (0)