• Invoke and stream response from a deployed flow.

    For example:

    import { streamFlow } from 'genkit/client';

    const response = streamFlow({
    url: 'https://my-flow-deployed-url',
    input: 'foo',
    });
    for await (const chunk of response.stream) {
    console.log(chunk);
    }
    console.log(await response.output);

    Type Parameters

    • O = any
    • S = any

    Parameters

    • __namedParameters: { headers?: Record<string, string>; input?: any; url: string }

    Returns { output(): Promise<O>; stream(): AsyncIterable<S> }