OpenAiClientGenerated.ts
OpenAiClientGenerated.ts overview
Section titled “OpenAiClientGenerated.ts overview”Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”constructors
Section titled “constructors”Creates a generated OpenAI client service with the given options.
Signature
declare const make: (options: Options) => Effect.Effect<Generated.OpenAiClient, never, HttpClient.HttpClient>Since v4.0.0
layers
Section titled “layers”Creates a layer for the generated OpenAI client with the given options.
Signature
declare const layer: (options: Options) => Layer.Layer<OpenAiClientGenerated, never, HttpClient.HttpClient>Since v4.0.0
layerConfig
Section titled “layerConfig”Creates a layer for the generated OpenAI client, loading the requisite
configuration via Effect’s Config module.
Signature
declare const layerConfig: (options?: { readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined readonly apiUrl?: Config.Config<string> | undefined readonly organizationId?: Config.Config<Redacted.Redacted<string> | undefined> | undefined readonly projectId?: Config.Config<Redacted.Redacted<string> | undefined> | undefined readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined}) => Layer.Layer<OpenAiClientGenerated, Config.ConfigError, HttpClient.HttpClient>Since v4.0.0
options
Section titled “options”Options (type alias)
Section titled “Options (type alias)”Options for configuring the generated OpenAI client.
Signature
type Options = { /** * The OpenAI API key. */ readonly apiKey?: Redacted.Redacted<string> | undefined
/** * The base URL for the OpenAI API. * * @default "https://api.openai.com/v1" */ readonly apiUrl?: string | undefined
/** * Optional organization ID for multi-org accounts. */ readonly organizationId?: Redacted.Redacted<string> | undefined
/** * Optional project ID for project-scoped requests. */ readonly projectId?: Redacted.Redacted<string> | undefined
/** * Optional transformer for the HTTP client. */ readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined}Since v4.0.0
service
Section titled “service”OpenAiClientGenerated (class)
Section titled “OpenAiClientGenerated (class)”Service identifier for the generated OpenAI client.
Signature
declare class OpenAiClientGeneratedSince v4.0.0