Skip to content

Commit 52c4b89

Browse files
authored
add transformClient option to OpenAiClient layer (#3949)
1 parent 3cc6514 commit 52c4b89

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/green-books-decide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/ai-openai": patch
3+
---
4+
5+
add transformClient option to OpenAiClient layer

packages/ai/openai/src/OpenAiClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export const layer = (options: {
156156
readonly apiKey: Redacted.Redacted
157157
readonly organizationId?: Redacted.Redacted | undefined
158158
readonly projectId?: Redacted.Redacted | undefined
159+
readonly transformClient?: (client: HttpClient.HttpClient) => HttpClient.HttpClient
159160
}): Layer.Layer<OpenAiClient, never, HttpClient.HttpClient> => Layer.effect(OpenAiClient, make(options))
160161

161162
/**
@@ -167,6 +168,7 @@ export const layerConfig = (
167168
readonly apiKey: Redacted.Redacted
168169
readonly organizationId?: Redacted.Redacted | undefined
169170
readonly projectId?: Redacted.Redacted | undefined
171+
readonly transformClient?: (client: HttpClient.HttpClient) => HttpClient.HttpClient
170172
}>
171173
): Layer.Layer<OpenAiClient, ConfigError, HttpClient.HttpClient> =>
172174
Config.unwrap(options).pipe(

0 commit comments

Comments
 (0)