From ed1887f88f1f64095fc9657c1c965c44f78cb7e6 Mon Sep 17 00:00:00 2001 From: D-K-P <8297864+D-K-P@users.noreply.github.com> Date: Mon, 3 Mar 2025 20:03:56 +0000 Subject: [PATCH] Updated imports --- docs/realtime/streams.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/realtime/streams.mdx b/docs/realtime/streams.mdx index 32af1ebab6..6f5ba353ca 100644 --- a/docs/realtime/streams.mdx +++ b/docs/realtime/streams.mdx @@ -166,7 +166,7 @@ async function subscribeToStream(runId: string) { If you're building a frontend application, you can use our React hooks to subscribe to streams. Here's an example of how you can use the `useRealtimeRunWithStreams` hook to subscribe to a stream: ```tsx -import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3"; +import { useRealtimeRunWithStreams } from "@trigger.dev/react-hooks"; import type { myTask, STREAMS } from "./trigger/my-task"; // Somewhere in your React component @@ -245,7 +245,7 @@ export const aiStreaming = schemaTask({ And then render the stream in your frontend: ```tsx -import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3"; +import { useRealtimeRunWithStreams } from "@trigger.dev/react-hooks"; import type { aiStreaming, STREAMS } from "./trigger/ai-streaming"; function MyComponent({ runId, publicAccessToken }: { runId: string; publicAccessToken: string }) { @@ -339,8 +339,7 @@ export const aiStreamingWithTools = schemaTask({ Now you can get access to the tool call and results in your frontend: ```tsx -import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3"; -import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3"; +import { useRealtimeRunWithStreams } from "@trigger.dev/react-hooks"; import type { aiStreamingWithTools, STREAMS } from "./trigger/ai-streaming"; function MyComponent({ runId, publicAccessToken }: { runId: string; publicAccessToken: string }) {