effect-io-ai

Package: @effect/ai-openai-compat
Module: OpenAiEmbeddingModel

OpenAiEmbeddingModel.layer

Creates a layer for an OpenAI-compatible embedding model service.

When to use

Use when composing application layers and you want an OpenAI-compatible embeddings endpoint to satisfy EmbeddingModel.EmbeddingModel while supplying OpenAiClient from another layer.

See

Signature

declare const layer: (options: { readonly model: string; readonly config?: ModelConfig | undefined; }) => Layer.Layer<EmbeddingModel.EmbeddingModel, never, OpenAiClient>

Source

Since v4.0.0