effect-io-ai

Package: @effect/ai-anthropic
Module: AnthropicClient

AnthropicClient.layerConfig

Creates a layer for the Anthropic client, loading the requisite configuration via Effect’s Config module.

When to use

Use when you want to provide the Anthropic client as a Layer with configuration loaded from Effect’s Config module, such as from environment variables or a secrets provider.

See

Signature

declare const layerConfig: (options?: { readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined; readonly apiUrl?: Config.Config<string> | undefined; readonly apiVersion?: Config.Config<string> | undefined; readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined; }) => Layer.Layer<AnthropicClient, Config.ConfigError, HttpClient.HttpClient>

Source

Since v4.0.0