UNPKG

@sap-ai-sdk/orchestration

Version:

SAP Cloud SDK for AI is the official Software Development Kit (SDK) for **SAP AI Core**, **SAP Generative AI Hub**, and **Orchestration Service**.

54 lines 1.75 kB
import type { ToolCallAccumulator } from './internal.js'; import type { MessageToolCalls, TokenUsage } from './client/api/schema/index.js'; import type { OrchestrationStream } from './orchestration-stream.js'; /** * Orchestration stream response. */ export declare class OrchestrationStreamResponse<T> { private _usage; /** * Finish reasons for all choices. */ private _finishReasons; private _toolCallsAccumulators; private _stream; /** * Gets the token usage for the response. * @returns The token usage for the response. */ getTokenUsage(): TokenUsage | undefined; /** * @internal */ _setTokenUsage(usage: TokenUsage): void; /** * Gets the finish reason for a specific choice index. * @param choiceIndex - The index of the choice to get the finish reason for. * @returns The finish reason for the specified choice index. */ getFinishReason(choiceIndex?: number): string | undefined; /** * @internal */ _getFinishReasons(): Map<number, string>; /** * @internal */ _setFinishReasons(finishReasons: Map<number, string>): void; /** * Gets the tool calls for a specific choice index. * @param choiceIndex - The index of the choice to get the tool calls for. * @returns The tool calls for the specified choice index. */ getToolCalls(choiceIndex?: number): MessageToolCalls | undefined; /** * @internal */ _getToolCallsAccumulators(): Map<number, Map<number, ToolCallAccumulator>>; get stream(): OrchestrationStream<T>; /** * @internal */ set stream(stream: OrchestrationStream<T>); } //# sourceMappingURL=orchestration-stream-response.d.ts.map