import { SseStream } from '@sap-ai-sdk/core'; import { OrchestrationStreamChunkResponse } from './orchestration-stream-chunk-response.js'; import type { CompletionPostResponseStreaming } from './client/api/schema/index.js'; import type { HttpResponse } from '@sap-cloud-sdk/http-client'; import type { OrchestrationStreamResponse } from './orchestration-stream-response.js'; /** * Orchestration stream containing post-processing functions. */ export declare class OrchestrationStream extends SseStream { iterator: () => AsyncIterator; /** * Create an orchestration stream based on the http response. * @param response - Http response. * @returns An orchestration stream. * @internal */ static _create(response: HttpResponse, controller: AbortController): OrchestrationStream; /** * Wrap raw chunk data with chunk response class to provide helper functions. * @param stream - Orchestration stream. * @internal */ static _processChunk(stream: OrchestrationStream): AsyncGenerator; static _processOrchestrationStreamChunkResponse(stream: OrchestrationStream, response?: OrchestrationStreamResponse): AsyncGenerator; static _processStreamEnd(stream: OrchestrationStream, response?: OrchestrationStreamResponse): AsyncGenerator; /** * Transform a stream of chunks into a stream of content strings. * @param stream - Orchestration stream. * @param choiceIndex - The index of the choice to parse. * @internal */ static _processContentStream(stream: OrchestrationStream): AsyncGenerator; constructor(iterator: () => AsyncIterator, controller: AbortController); /** * Pipe the stream through a processing function. * @param processFn - The function to process the input stream. * @param response - The `OrchestrationStreamResponse` object for process function to store finish reason, token usage, etc. * @returns The output stream containing processed items. * @internal */ _pipe(processFn: (stream: OrchestrationStream, response?: OrchestrationStreamResponse) => AsyncIterator, response?: OrchestrationStreamResponse): OrchestrationStream; /** * Transform the stream of chunks into a stream of content strings. * @param this - Orchestration stream. * @returns A stream of content strings. */ toContentStream(this: OrchestrationStream): OrchestrationStream; } //# sourceMappingURL=orchestration-stream.d.ts.map