import { type OpenAIBatchClientOptions } from '../batch/openai-client.js'; import type { BatchJobRef, BatchJobState, BatchProviderCallContext } from '../types/batch.js'; import type { EmbeddingBatchOutputItem, EmbeddingBatchProvider, EmbeddingBatchProviderInfo, EmbeddingBatchProviderRequest } from './batch.js'; /** Options for OpenAI's embedding batch tier: the key, and optionally the base URL, organization, and `fetch`. */ export type OpenAIEmbeddingBatchProviderOptions = OpenAIBatchClientOptions; /** * OpenAI's Batch API for `/v1/embeddings`: half price, a 24-hour window, and at most 50,000 inputs a * batch. Each input is one line; failed lines are read from the error file, so none goes missing. */ export declare class OpenAIEmbeddingBatchProvider implements EmbeddingBatchProvider { /** Always `openai`, with its batch limits. */ readonly info: EmbeddingBatchProviderInfo; private readonly client; constructor(options: OpenAIEmbeddingBatchProviderOptions); /** Uploads one line per input and creates a batch over them. */ submit(request: EmbeddingBatchProviderRequest, context: BatchProviderCallContext): Promise; /** Reads a batch's status and counts. */ poll(ref: BatchJobRef, context: BatchProviderCallContext): Promise; /** Every input's vector or error, from the output and error files. */ results(ref: BatchJobRef, context: BatchProviderCallContext): Promise; /** Cancels a batch. Inputs already embedded keep their results. */ cancel(ref: BatchJobRef, context: BatchProviderCallContext): Promise; }