UNPKG

@mastra/core

Version:

The core foundation of the Mastra framework, providing essential components and interfaces for building AI-powered applications.

30 lines 1.06 kB
import { ReadableStream } from 'stream/web'; export type ChunkType = { type: string; runId: string; from: string; payload: Record<string, any>; }; export declare class MastraAgentStream<Output> extends ReadableStream<ChunkType> { #private; constructor({ createStream, getOptions, }: { createStream: (writer: WritableStream<ChunkType>, onResult: (result: Output) => void) => Promise<ReadableStream<any>> | ReadableStream<any>; getOptions: () => Promise<{ runId: string; }> | { runId: string; }; }); get finishReason(): Promise<string | null>; get toolCalls(): Promise<Record<string, any>[]>; get toolResults(): Promise<Record<string, any>[]>; get usage(): Promise<{ promptTokens: number; completionTokens: number; totalTokens: number; }>; get text(): Promise<string>; get object(): Promise<Output extends undefined ? null : Output>; get textStream(): ReadableStream<string>; } //# sourceMappingURL=MastraAgentStream.d.ts.map