@ai-sdk/provider-utils
Version:
33 lines (29 loc) • 1.04 kB
text/typescript
import type { SharedV4ProviderOptions } from '@ai-sdk/provider';
/**
* Symbol for exposing the UTF-8 input byte budget of an embedding model.
*
* This capability is experimental and intentionally lives outside the versioned
* embedding model specification.
*/
export const EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL = Symbol.for(
'vercel.ai.embeddingModel.maxInputBytesPerCall',
);
/**
* Symbol for transforming provider options for an automatically batched
* embedding model call.
*
* This capability is experimental and intentionally lives outside the versioned
* embedding model specification.
*/
export const EMBEDDING_MODEL_PROVIDER_OPTIONS_TRANSFORMER = Symbol.for(
'vercel.ai.embeddingModel.providerOptionsTransformer',
);
export type EmbeddingModelProviderOptionsTransformer = (options: {
providerOptions: SharedV4ProviderOptions | undefined;
values: Array<string>;
startIndex: number;
endIndex: number;
}) =>
| SharedV4ProviderOptions
| undefined
| PromiseLike<SharedV4ProviderOptions | undefined>;