langchain.js
    Preparing search index...

    Interface UseStreamTransport<StateType, Bag>

    Transport used to stream the thread. Only applicable for custom endpoints using toLangGraphEventStream or toLangGraphEventStreamResponse.

    interface UseStreamTransport<
        StateType extends Record<string, unknown> = Record<string, unknown>,
        Bag extends BagTemplate = BagTemplate,
    > {
        stream: (
            payload: {
                command: undefined | Command;
                config: undefined | ConfigWithConfigurable<GetConfigurableType<Bag>>;
                context: undefined | GetConfigurableType<Bag>;
                input: undefined | null | GetUpdateType<Bag, StateType>;
                signal: AbortSignal;
            },
        ) => Promise<
            AsyncGenerator<{ data: unknown; event: string; id?: string }, any, any>,
        >;
    }

    Type Parameters

    • StateType extends Record<string, unknown> = Record<string, unknown>
    • Bag extends BagTemplate = BagTemplate

    Implemented by

    Index

    Properties

    Properties

    stream: (
        payload: {
            command: undefined | Command;
            config: undefined | ConfigWithConfigurable<GetConfigurableType<Bag>>;
            context: undefined | GetConfigurableType<Bag>;
            input: undefined | null | GetUpdateType<Bag, StateType>;
            signal: AbortSignal;
        },
    ) => Promise<
        AsyncGenerator<{ data: unknown; event: string; id?: string }, any, any>,
    >