import { PromptResult, Result, StreamChunk, ToolCallJSON } from "smoltalk";
import type { RuntimeContext } from "./state/context.js";
import { GraphState } from "./types.js";
export declare function isGenerator(variable: any): boolean;
export declare function handleStreamingResponse(args: {
    ctx: RuntimeContext<GraphState>;
    completion: AsyncGenerator<StreamChunk>;
    prompt: string;
}): Promise<Result<{
    completion: PromptResult;
    toolCalls: ToolCallJSON[];
}> | undefined>;
