MCPcopy
hub / github.com/thesysdev/openui / StreamOpenUIOptions

Interface StreamOpenUIOptions

examples/langchain-chat/src/lib/stream-openui.ts:6–33  ·  view source on GitHub ↗

* Options for streamOpenUI.

Source from the content-addressed store, hash-verified

4 * Options for {@link streamOpenUI}.
5 */
6interface StreamOpenUIOptions {
7 /**
8 * Base URL of the LangGraph server (agent protocol v2), e.g.
9 * `http://localhost:2024`. Trailing slashes are stripped before use.
10 */
11 apiUrl: string;
12 /**
13 * The id of the graph/assistant to run (the `graph_id` registered with the
14 * LangGraph server, e.g. `"agent"`).
15 */
16 assistantId: string;
17 /**
18 * Optional API key forwarded as the `x-api-key` header (required by
19 * LangSmith deployments, omitted for local `langgraphjs dev`).
20 */
21 apiKey?: string;
22 /**
23 * The run input handed to the graph — typically `{ messages: [...] }` in
24 * LangChain message format. Kept as `unknown` since this helper does not
25 * interpret it.
26 */
27 input: unknown;
28 /**
29 * Caller's abort signal (Next.js aborts this when the browser disconnects).
30 * Aborting tears down the upstream LangGraph fetches and closes the stream.
31 */
32 signal?: AbortSignal;
33}
34
35/**
36 * A single Server-Sent Events frame parsed out of the LangGraph response body,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected