/**
 * Stream wrapper class inspired by OpenAI SDK
 * Provides utilities for working with async iterables
 */
export declare class Stream<T> implements AsyncIterable<T> {
    private iterator;
    private controller?;
    private consumed;
    constructor(iterator: () => AsyncIterator<T>, controller?: AbortController | undefined);
    /**
     * Create a Stream from an async generator
     */
    static fromAsyncIterable<T>(iterable: AsyncIterable<T>, controller?: AbortController): Stream<T>;
    [Symbol.asyncIterator](): AsyncIterator<T>;
    /**
     * Splits the stream into two streams which can be
     * independently read from at different speeds.
     */
    tee(): [Stream<T>, Stream<T>];
    /**
     * Collect all chunks into an array
     */
    toArray(): Promise<T[]>;
    /**
     * Abort the underlying stream
     */
    abort(): void;
}
//# sourceMappingURL=Stream.d.ts.map