@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**.
39 lines • 1.62 kB
TypeScript
import type { CompletionPostResponseStreaming, LlmChoiceStreaming, TokenUsage, ToolCallChunk } from './client/api/schema/index.js';
/**
* Orchestration stream chunk response.
*/
export declare class OrchestrationStreamChunkResponse {
readonly data: CompletionPostResponseStreaming;
constructor(data: CompletionPostResponseStreaming);
/**
* Usage of tokens in the chunk response.
* @returns Token usage.
*/
getTokenUsage(): TokenUsage | undefined;
/**
* Reason for stopping the completion stream chunk.
* @param choiceIndex - The index of the choice to parse.
* @returns The finish reason.
*/
getFinishReason(choiceIndex?: number): string | undefined;
/**
* Gets the delta tool calls for a specific choice index.
* @param choiceIndex - The index of the choice to parse.
* @returns The delta tool calls for the specified choice index.
*/
getDeltaToolCalls(choiceIndex?: number): ToolCallChunk[] | undefined;
/**
* Parses the chunk response and returns the delta content.
* @param choiceIndex - The index of the choice to parse.
* @returns The message delta content.
*/
getDeltaContent(choiceIndex?: number): string | undefined;
/**
* Parses the chunk response and returns the choice by index.
* @param index - The index of the choice to find.
* @returns An {@link LLMChoiceStreaming} object associated with the index.
*/
findChoiceByIndex(index: number): LlmChoiceStreaming | undefined;
private getChoices;
}
//# sourceMappingURL=orchestration-stream-chunk-response.d.ts.map