OpenAiClientGenerated
Constructors
Layers
Creates a layer for the generated OpenAI client with the given options.
Signature
declare function layer(options: Options): Layer<OpenAiClientGenerated, never, HttpClient>;layerConfig
Added in v4.0.0
Source
Creates a layer for the generated OpenAI client, loading the requisite configuration via Effect's Config module.
Signature
declare function layerConfig(options?: { readonly apiKey?: Config<Redacted<string> | undefined>; readonly apiUrl?: Config<string>; readonly organizationId?: Config<Redacted<string> | undefined>; readonly projectId?: Config<Redacted<string> | undefined>; readonly transformClient?: (client: HttpClient) => HttpClient;}): Layer<OpenAiClientGenerated, ConfigError, HttpClient>;Options
Options for configuring the generated OpenAI client.
Signature
type Options = { readonly apiKey?: Redacted.Redacted<string>; readonly apiUrl?: string; readonly organizationId?: Redacted.Redacted<string>; readonly projectId?: Redacted.Redacted<string>; readonly transformClient?: (client: HttpClient.HttpClient) => HttpClient.HttpClient;};Service
OpenAiClientGenerated
Added in v4.0.0
Source
Service identifier for the generated OpenAI client.
Signature
declare class OpenAiClientGenerated extends Shape< "@effect/ai-openai/OpenAiClientGenerated", OpenAiClient, this> { constructor(_: never);}
Creates a generated OpenAI client service with the given options.