@sap-ai-sdk/foundation-models
Version:
SAP Cloud SDK for AI is the official Software Development Kit (SDK) for **SAP AI Core**, **SAP Generative AI Hub**, and **Orchestration Service**.
43 lines • 1.79 kB
TypeScript
import type { AzureOpenAiCreateChatCompletionResponse } from './client/inference/schema/index.js';
/**
* Error details for a failed batch request.
* @experimental This API is experimental and may change at any time without prior notice.
*/
export interface BatchOutputError {
/** Error code, or null if not available. */
code: string | null;
/** Error message details. */
message: unknown;
}
/**
* Response details for a single batch output line.
* @experimental This API is experimental and may change at any time without prior notice.
*/
export interface BatchOutputResponse {
/** HTTP status code of the response. */
status_code: number;
/** Request ID assigned by the service. */
request_id?: string;
/** The chat completion response body. */
body?: AzureOpenAiCreateChatCompletionResponse;
}
/**
* Represents a single parsed line from the batch output JSONL file.
* @experimental This API is experimental and may change at any time without prior notice.
*/
export interface BatchOutputLine {
/** Custom identifier for the request. */
custom_id: string;
/** Response details, or null if the request failed. */
response: BatchOutputResponse | null;
/** Error details, or null if the request succeeded. */
error: BatchOutputError | null;
}
/**
* Parses a batch output JSONL payload into typed output lines.
* @param data - The data returned from FileApi.fileDownload(), as a Blob, Buffer, or string.
* @returns A Promise resolving to an array of parsed output lines.
* @experimental This API is experimental and may change at any time without prior notice.
*/
export declare function parseBatchOutput(data: Blob | Buffer | string): Promise<BatchOutputLine[]>;
//# sourceMappingURL=azure-openai-batch-output.d.ts.map