Package: @effect/ai
Module: EmbeddingModel
Creates an EmbeddingModel service with batching and caching capabilities.
This is the primary constructor for creating embedding services. It supports automatic batching of requests for efficiency and optional caching to reduce redundant API calls.
Signature
declare const make: (options: { readonly embedMany: (input: ReadonlyArray<string>) => Effect.Effect<Array<Result>, AiError.AiError>; readonly maxBatchSize?: number; readonly cache?: { readonly capacity: number; readonly timeToLive: Duration.DurationInput; }; }) => Effect.Effect<Service, never, never>
Since v1.0.0