effect-io-ai

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

OpenAiClient.make

Constructs an OpenAI-compatible client service from explicit options.

When to use

Use when you need the OpenAI-compatible client service value inside an effect.

Details

The returned service uses the current HttpClient, prepends apiUrl or https://api.openai.com/v1, adds authentication and OpenAI organization/project headers, accepts JSON responses, and applies transformClient when provided.

Gotchas

A scoped OpenAiConfig.withClientTransform is applied when request helpers run, after the transformClient option supplied to make.

See

Signature

declare const make: (options: Options) => Effect.Effect<Service, never, HttpClient.HttpClient>

Source

Since v4.0.0