@effect/ai-openai 4.0.0-beta.66 → 4.0.0-beta.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Generated.d.ts +1 -1
- package/dist/Generated.js +1 -1
- package/dist/OpenAiClient.d.ts +18 -11
- package/dist/OpenAiClient.d.ts.map +1 -1
- package/dist/OpenAiClient.js +10 -8
- package/dist/OpenAiClient.js.map +1 -1
- package/dist/OpenAiClientGenerated.d.ts +5 -5
- package/dist/OpenAiClientGenerated.js +5 -5
- package/dist/OpenAiConfig.d.ts +43 -8
- package/dist/OpenAiConfig.d.ts.map +1 -1
- package/dist/OpenAiConfig.js +28 -4
- package/dist/OpenAiConfig.js.map +1 -1
- package/dist/OpenAiEmbeddingModel.d.ts +13 -9
- package/dist/OpenAiEmbeddingModel.d.ts.map +1 -1
- package/dist/OpenAiEmbeddingModel.js +8 -6
- package/dist/OpenAiEmbeddingModel.js.map +1 -1
- package/dist/OpenAiError.d.ts +124 -3
- package/dist/OpenAiError.d.ts.map +1 -1
- package/dist/OpenAiError.js +1 -1
- package/dist/OpenAiLanguageModel.d.ts +160 -9
- package/dist/OpenAiLanguageModel.d.ts.map +1 -1
- package/dist/OpenAiLanguageModel.js +9 -7
- package/dist/OpenAiLanguageModel.js.map +1 -1
- package/dist/OpenAiSchema.d.ts +108 -35
- package/dist/OpenAiSchema.d.ts.map +1 -1
- package/dist/OpenAiSchema.js +55 -18
- package/dist/OpenAiSchema.js.map +1 -1
- package/dist/OpenAiTelemetry.d.ts +13 -10
- package/dist/OpenAiTelemetry.d.ts.map +1 -1
- package/dist/OpenAiTelemetry.js +2 -2
- package/dist/OpenAiTelemetry.js.map +1 -1
- package/dist/OpenAiTool.d.ts +11 -11
- package/dist/OpenAiTool.js +10 -10
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/package.json +3 -3
- package/src/Generated.ts +1 -1
- package/src/OpenAiClient.ts +19 -12
- package/src/OpenAiClientGenerated.ts +6 -6
- package/src/OpenAiConfig.ts +43 -8
- package/src/OpenAiEmbeddingModel.ts +15 -11
- package/src/OpenAiError.ts +124 -3
- package/src/OpenAiLanguageModel.ts +163 -12
- package/src/OpenAiSchema.ts +109 -36
- package/src/OpenAiTelemetry.ts +14 -11
- package/src/OpenAiTool.ts +11 -11
- package/src/index.ts +11 -11
|
@@ -7,24 +7,24 @@ import * as Telemetry from "effect/unstable/ai/Telemetry";
|
|
|
7
7
|
*
|
|
8
8
|
* {@see https://opentelemetry.io/docs/specs/semconv/attributes-registry/gen-ai/}
|
|
9
9
|
*
|
|
10
|
-
* @since 1.0.0
|
|
11
10
|
* @category models
|
|
11
|
+
* @since 4.0.0
|
|
12
12
|
*/
|
|
13
13
|
export type OpenAiTelemetryAttributes = Simplify<Telemetry.GenAITelemetryAttributes & Telemetry.AttributesWithPrefix<RequestAttributes, "gen_ai.openai.request"> & Telemetry.AttributesWithPrefix<ResponseAttributes, "gen_ai.openai.request">>;
|
|
14
14
|
/**
|
|
15
15
|
* All telemetry attributes which are part of the GenAI specification,
|
|
16
16
|
* including the OpenAi-specific attributes.
|
|
17
17
|
*
|
|
18
|
-
* @since 1.0.0
|
|
19
18
|
* @category models
|
|
19
|
+
* @since 4.0.0
|
|
20
20
|
*/
|
|
21
21
|
export type AllAttributes = Telemetry.AllAttributes & RequestAttributes & ResponseAttributes;
|
|
22
22
|
/**
|
|
23
23
|
* Telemetry attributes which are part of the GenAI specification and are
|
|
24
24
|
* namespaced by `gen_ai.openai.request`.
|
|
25
25
|
*
|
|
26
|
-
* @since 1.0.0
|
|
27
26
|
* @category models
|
|
27
|
+
* @since 4.0.0
|
|
28
28
|
*/
|
|
29
29
|
export interface RequestAttributes {
|
|
30
30
|
/**
|
|
@@ -40,8 +40,8 @@ export interface RequestAttributes {
|
|
|
40
40
|
* Telemetry attributes which are part of the GenAI specification and are
|
|
41
41
|
* namespaced by `gen_ai.openai.response`.
|
|
42
42
|
*
|
|
43
|
-
* @since 1.0.0
|
|
44
43
|
* @category models
|
|
44
|
+
* @since 4.0.0
|
|
45
45
|
*/
|
|
46
46
|
export interface ResponseAttributes {
|
|
47
47
|
/**
|
|
@@ -61,8 +61,8 @@ export interface ResponseAttributes {
|
|
|
61
61
|
* If one of them applies, then the respective value **MUST** be used;
|
|
62
62
|
* otherwise, a custom value **MAY** be used.
|
|
63
63
|
*
|
|
64
|
-
* @since 1.0.0
|
|
65
64
|
* @category models
|
|
65
|
+
* @since 4.0.0
|
|
66
66
|
*/
|
|
67
67
|
export type WellKnownResponseFormat = "json_object" | "json_schema" | "text";
|
|
68
68
|
/**
|
|
@@ -72,12 +72,15 @@ export type WellKnownResponseFormat = "json_object" | "json_schema" | "text";
|
|
|
72
72
|
* If one of them applies, then the respective value **MUST** be used;
|
|
73
73
|
* otherwise, a custom value **MAY** be used.
|
|
74
74
|
*
|
|
75
|
-
* @since 1.0.0
|
|
76
75
|
* @category models
|
|
76
|
+
* @since 4.0.0
|
|
77
77
|
*/
|
|
78
78
|
export type WellKnownServiceTier = "auto" | "default";
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Options accepted by `addGenAIAnnotations`, combining standard GenAI
|
|
81
|
+
* telemetry attributes with optional OpenAI request and response attributes.
|
|
82
|
+
*
|
|
83
|
+
* @since 4.0.0
|
|
81
84
|
* @since models
|
|
82
85
|
*/
|
|
83
86
|
export type OpenAiTelemetryAttributeOptions = Telemetry.GenAITelemetryAttributeOptions & {
|
|
@@ -92,7 +95,7 @@ export type OpenAiTelemetryAttributeOptions = Telemetry.GenAITelemetryAttributeO
|
|
|
92
95
|
*
|
|
93
96
|
* **NOTE**: This method will mutate the `Span` **in-place**.
|
|
94
97
|
*
|
|
95
|
-
* @since
|
|
98
|
+
* @since 4.0.0
|
|
96
99
|
* @since utilities
|
|
97
100
|
*/
|
|
98
101
|
export declare const addGenAIAnnotations: {
|
|
@@ -102,7 +105,7 @@ export declare const addGenAIAnnotations: {
|
|
|
102
105
|
*
|
|
103
106
|
* **NOTE**: This method will mutate the `Span` **in-place**.
|
|
104
107
|
*
|
|
105
|
-
* @since
|
|
108
|
+
* @since 4.0.0
|
|
106
109
|
* @since utilities
|
|
107
110
|
*/
|
|
108
111
|
(options: OpenAiTelemetryAttributeOptions): (span: Span) => void;
|
|
@@ -112,7 +115,7 @@ export declare const addGenAIAnnotations: {
|
|
|
112
115
|
*
|
|
113
116
|
* **NOTE**: This method will mutate the `Span` **in-place**.
|
|
114
117
|
*
|
|
115
|
-
* @since
|
|
118
|
+
* @since 4.0.0
|
|
116
119
|
* @since utilities
|
|
117
120
|
*/
|
|
118
121
|
(span: Span, options: OpenAiTelemetryAttributeOptions): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiTelemetry.d.ts","sourceRoot":"","sources":["../src/OpenAiTelemetry.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAA;AAEzD;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAC5C,SAAS,CAAC,wBAAwB,GAClC,SAAS,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,GAC1E,SAAS,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAC9E,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAE5F;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,uBAAuB,GAAG,IAAI,GAAG,SAAS,CAAA;IACpF;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAA;CAC/E;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACvD;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,CAAA;AAErD
|
|
1
|
+
{"version":3,"file":"OpenAiTelemetry.d.ts","sourceRoot":"","sources":["../src/OpenAiTelemetry.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAA;AAEzD;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAC5C,SAAS,CAAC,wBAAwB,GAClC,SAAS,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,GAC1E,SAAS,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAC9E,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAE5F;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,uBAAuB,GAAG,IAAI,GAAG,SAAS,CAAA;IACpF;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAA;CAC/E;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACvD;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAC,8BAA8B,GAAG;IACvF,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;QACvC,QAAQ,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAA;KAC1C,GAAG,SAAS,CAAA;CACd,CAAA;AASD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAChC;;;;;;;;OAQG;IACH,CAAC,OAAO,EAAE,+BAA+B,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAChE;;;;;;;;OAQG;IACH,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,+BAA+B,GAAG,IAAI,CAAA;CAW5D,CAAA"}
|
package/dist/OpenAiTelemetry.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* semantic conventions, extending the base GenAI attributes with OpenAI-specific
|
|
6
6
|
* request and response metadata.
|
|
7
7
|
*
|
|
8
|
-
* @since
|
|
8
|
+
* @since 4.0.0
|
|
9
9
|
*/
|
|
10
10
|
import { dual } from "effect/Function";
|
|
11
11
|
import * as String from "effect/String";
|
|
@@ -18,7 +18,7 @@ const addOpenAiResponseAttributes = /*#__PURE__*/Telemetry.addSpanAttributes("ge
|
|
|
18
18
|
*
|
|
19
19
|
* **NOTE**: This method will mutate the `Span` **in-place**.
|
|
20
20
|
*
|
|
21
|
-
* @since
|
|
21
|
+
* @since 4.0.0
|
|
22
22
|
* @since utilities
|
|
23
23
|
*/
|
|
24
24
|
export const addGenAIAnnotations = /*#__PURE__*/dual(2, (span, options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiTelemetry.js","names":["dual","String","Telemetry","addOpenAiRequestAttributes","addSpanAttributes","camelToSnake","addOpenAiResponseAttributes","addGenAIAnnotations","span","options","openai","request","response"],"sources":["../src/OpenAiTelemetry.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,SAASA,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAGvC,OAAO,KAAKC,SAAS,MAAM,8BAA8B;
|
|
1
|
+
{"version":3,"file":"OpenAiTelemetry.js","names":["dual","String","Telemetry","addOpenAiRequestAttributes","addSpanAttributes","camelToSnake","addOpenAiResponseAttributes","addGenAIAnnotations","span","options","openai","request","response"],"sources":["../src/OpenAiTelemetry.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,SAASA,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAGvC,OAAO,KAAKC,SAAS,MAAM,8BAA8B;AAqGzD,MAAMC,0BAA0B,gBAAGD,SAAS,CAACE,iBAAiB,CAAC,uBAAuB,EAAEH,MAAM,CAACI,YAAY,CAE1G;AACD,MAAMC,2BAA2B,gBAAGJ,SAAS,CAACE,iBAAiB,CAAC,wBAAwB,EAAEH,MAAM,CAACI,YAAY,CAE5G;AAED;;;;;;;;;AASA,OAAO,MAAME,mBAAmB,gBAqB5BP,IAAI,CAAC,CAAC,EAAE,CAACQ,IAAU,EAAEC,OAAwC,KAAI;EACnEP,SAAS,CAACK,mBAAmB,CAACC,IAAI,EAAEC,OAAO,CAAC;EAC5C,IAAIA,OAAO,CAACC,MAAM,IAAI,IAAI,EAAE;IAC1B,IAAID,OAAO,CAACC,MAAM,CAACC,OAAO,IAAI,IAAI,EAAE;MAClCR,0BAA0B,CAACK,IAAI,EAAEC,OAAO,CAACC,MAAM,CAACC,OAAO,CAAC;IAC1D;IACA,IAAIF,OAAO,CAACC,MAAM,CAACE,QAAQ,IAAI,IAAI,EAAE;MACnCN,2BAA2B,CAACE,IAAI,EAAEC,OAAO,CAACC,MAAM,CAACE,QAAQ,CAAC;IAC5D;EACF;AACF,CAAC,CAAC","ignoreList":[]}
|
package/dist/OpenAiTool.d.ts
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* Provides tools that are natively supported by OpenAI's API, including
|
|
5
5
|
* code interpreter, file search, and web search functionality.
|
|
6
6
|
*
|
|
7
|
-
* @since
|
|
7
|
+
* @since 4.0.0
|
|
8
8
|
*/
|
|
9
9
|
import * as Schema from "effect/Schema";
|
|
10
10
|
import * as Tool from "effect/unstable/ai/Tool";
|
|
11
11
|
/**
|
|
12
12
|
* Union of all OpenAI provider-defined tools.
|
|
13
13
|
*
|
|
14
|
-
* @since 1.0.0
|
|
15
14
|
* @category models
|
|
15
|
+
* @since 4.0.0
|
|
16
16
|
*/
|
|
17
17
|
export type OpenAiTool = ReturnType<typeof ApplyPatch> | ReturnType<typeof CodeInterpreter> | ReturnType<typeof FileSearch> | ReturnType<typeof Shell> | ReturnType<typeof ImageGeneration> | ReturnType<typeof LocalShell> | ReturnType<typeof Mcp> | ReturnType<typeof WebSearch> | ReturnType<typeof WebSearchPreview>;
|
|
18
18
|
/**
|
|
@@ -22,8 +22,8 @@ export type OpenAiTool = ReturnType<typeof ApplyPatch> | ReturnType<typeof CodeI
|
|
|
22
22
|
* This is a local tool that runs in your environment and requires a handler
|
|
23
23
|
* to execute file operations.
|
|
24
24
|
*
|
|
25
|
-
* @since 1.0.0
|
|
26
25
|
* @category tools
|
|
26
|
+
* @since 4.0.0
|
|
27
27
|
*/
|
|
28
28
|
export declare const ApplyPatch: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
29
29
|
readonly failureMode?: Mode | undefined;
|
|
@@ -56,8 +56,8 @@ export declare const ApplyPatch: <Mode extends Tool.FailureMode | undefined = un
|
|
|
56
56
|
*
|
|
57
57
|
* Allows the model to execute Python code in a sandboxed environment.
|
|
58
58
|
*
|
|
59
|
-
* @since 1.0.0
|
|
60
59
|
* @category tools
|
|
60
|
+
* @since 4.0.0
|
|
61
61
|
*/
|
|
62
62
|
export declare const CodeInterpreter: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
63
63
|
readonly container: string | {
|
|
@@ -116,8 +116,8 @@ export declare const CodeInterpreter: <Mode extends Tool.FailureMode | undefined
|
|
|
116
116
|
*
|
|
117
117
|
* Enables the model to search through uploaded files and vector stores.
|
|
118
118
|
*
|
|
119
|
-
* @since 1.0.0
|
|
120
119
|
* @category tools
|
|
120
|
+
* @since 4.0.0
|
|
121
121
|
*/
|
|
122
122
|
export declare const FileSearch: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
123
123
|
readonly vector_store_ids: readonly string[];
|
|
@@ -183,8 +183,8 @@ export declare const FileSearch: <Mode extends Tool.FailureMode | undefined = un
|
|
|
183
183
|
*
|
|
184
184
|
* Enables the model to generate images using the GPT image models.
|
|
185
185
|
*
|
|
186
|
-
* @since 1.0.0
|
|
187
186
|
* @category tools
|
|
187
|
+
* @since 4.0.0
|
|
188
188
|
*/
|
|
189
189
|
export declare const ImageGeneration: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
190
190
|
readonly background?: "auto" | "transparent" | "opaque";
|
|
@@ -229,8 +229,8 @@ export declare const ImageGeneration: <Mode extends Tool.FailureMode | undefined
|
|
|
229
229
|
* Enables the model to run a command with a local shell. This is a local tool
|
|
230
230
|
* that runs in your environment and requires a handler to execute commands.
|
|
231
231
|
*
|
|
232
|
-
* @since 1.0.0
|
|
233
232
|
* @category tools
|
|
233
|
+
* @since 4.0.0
|
|
234
234
|
*/
|
|
235
235
|
export declare const LocalShell: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
236
236
|
readonly failureMode?: Mode | undefined;
|
|
@@ -258,8 +258,8 @@ export declare const LocalShell: <Mode extends Tool.FailureMode | undefined = un
|
|
|
258
258
|
* Gives the model access to additional tools via remote Model Context Protocol
|
|
259
259
|
* (MCP) servers
|
|
260
260
|
*
|
|
261
|
-
* @since 1.0.0
|
|
262
261
|
* @category tools
|
|
262
|
+
* @since 4.0.0
|
|
263
263
|
*/
|
|
264
264
|
export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
265
265
|
readonly server_label: string;
|
|
@@ -322,8 +322,8 @@ export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined
|
|
|
322
322
|
* environment. This is a local tool that runs in your environment and requires
|
|
323
323
|
* a handler to execute commands.
|
|
324
324
|
*
|
|
325
|
-
* @since 1.0.0
|
|
326
325
|
* @category tools
|
|
326
|
+
* @since 4.0.0
|
|
327
327
|
*/
|
|
328
328
|
export declare const Shell: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
329
329
|
readonly failureMode?: Mode | undefined;
|
|
@@ -357,8 +357,8 @@ export declare const Shell: <Mode extends Tool.FailureMode | undefined = undefin
|
|
|
357
357
|
*
|
|
358
358
|
* Enables the model to search the web for information.
|
|
359
359
|
*
|
|
360
|
-
* @since 1.0.0
|
|
361
360
|
* @category tools
|
|
361
|
+
* @since 4.0.0
|
|
362
362
|
*/
|
|
363
363
|
export declare const WebSearch: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
364
364
|
readonly filters?: {
|
|
@@ -431,8 +431,8 @@ export declare const WebSearch: <Mode extends Tool.FailureMode | undefined = und
|
|
|
431
431
|
*
|
|
432
432
|
* Preview version of the web search tool with additional features.
|
|
433
433
|
*
|
|
434
|
-
* @since 1.0.0
|
|
435
434
|
* @category tools
|
|
435
|
+
* @since 4.0.0
|
|
436
436
|
*/
|
|
437
437
|
export declare const WebSearchPreview: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
438
438
|
readonly user_location?: {
|
package/dist/OpenAiTool.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides tools that are natively supported by OpenAI's API, including
|
|
5
5
|
* code interpreter, file search, and web search functionality.
|
|
6
6
|
*
|
|
7
|
-
* @since
|
|
7
|
+
* @since 4.0.0
|
|
8
8
|
*/
|
|
9
9
|
import * as Schema from "effect/Schema";
|
|
10
10
|
import * as Tool from "effect/unstable/ai/Tool";
|
|
@@ -16,8 +16,8 @@ import * as Generated from "./Generated.js";
|
|
|
16
16
|
* This is a local tool that runs in your environment and requires a handler
|
|
17
17
|
* to execute file operations.
|
|
18
18
|
*
|
|
19
|
-
* @since 1.0.0
|
|
20
19
|
* @category tools
|
|
20
|
+
* @since 4.0.0
|
|
21
21
|
*/
|
|
22
22
|
export const ApplyPatch = /*#__PURE__*/Tool.providerDefined({
|
|
23
23
|
id: "openai.apply_patch",
|
|
@@ -38,8 +38,8 @@ export const ApplyPatch = /*#__PURE__*/Tool.providerDefined({
|
|
|
38
38
|
*
|
|
39
39
|
* Allows the model to execute Python code in a sandboxed environment.
|
|
40
40
|
*
|
|
41
|
-
* @since 1.0.0
|
|
42
41
|
* @category tools
|
|
42
|
+
* @since 4.0.0
|
|
43
43
|
*/
|
|
44
44
|
export const CodeInterpreter = /*#__PURE__*/Tool.providerDefined({
|
|
45
45
|
id: "openai.code_interpreter",
|
|
@@ -61,8 +61,8 @@ export const CodeInterpreter = /*#__PURE__*/Tool.providerDefined({
|
|
|
61
61
|
*
|
|
62
62
|
* Enables the model to search through uploaded files and vector stores.
|
|
63
63
|
*
|
|
64
|
-
* @since 1.0.0
|
|
65
64
|
* @category tools
|
|
65
|
+
* @since 4.0.0
|
|
66
66
|
*/
|
|
67
67
|
export const FileSearch = /*#__PURE__*/Tool.providerDefined({
|
|
68
68
|
id: "openai.file_search",
|
|
@@ -85,8 +85,8 @@ export const FileSearch = /*#__PURE__*/Tool.providerDefined({
|
|
|
85
85
|
*
|
|
86
86
|
* Enables the model to generate images using the GPT image models.
|
|
87
87
|
*
|
|
88
|
-
* @since 1.0.0
|
|
89
88
|
* @category tools
|
|
89
|
+
* @since 4.0.0
|
|
90
90
|
*/
|
|
91
91
|
export const ImageGeneration = /*#__PURE__*/Tool.providerDefined({
|
|
92
92
|
id: "openai.image_generation",
|
|
@@ -114,8 +114,8 @@ export const ImageGeneration = /*#__PURE__*/Tool.providerDefined({
|
|
|
114
114
|
* Enables the model to run a command with a local shell. This is a local tool
|
|
115
115
|
* that runs in your environment and requires a handler to execute commands.
|
|
116
116
|
*
|
|
117
|
-
* @since 1.0.0
|
|
118
117
|
* @category tools
|
|
118
|
+
* @since 4.0.0
|
|
119
119
|
*/
|
|
120
120
|
export const LocalShell = /*#__PURE__*/Tool.providerDefined({
|
|
121
121
|
id: "openai.local_shell",
|
|
@@ -135,8 +135,8 @@ export const LocalShell = /*#__PURE__*/Tool.providerDefined({
|
|
|
135
135
|
* Gives the model access to additional tools via remote Model Context Protocol
|
|
136
136
|
* (MCP) servers
|
|
137
137
|
*
|
|
138
|
-
* @since 1.0.0
|
|
139
138
|
* @category tools
|
|
139
|
+
* @since 4.0.0
|
|
140
140
|
*/
|
|
141
141
|
export const Mcp = /*#__PURE__*/Tool.providerDefined({
|
|
142
142
|
id: "openai.mcp",
|
|
@@ -168,8 +168,8 @@ export const Mcp = /*#__PURE__*/Tool.providerDefined({
|
|
|
168
168
|
* environment. This is a local tool that runs in your environment and requires
|
|
169
169
|
* a handler to execute commands.
|
|
170
170
|
*
|
|
171
|
-
* @since 1.0.0
|
|
172
171
|
* @category tools
|
|
172
|
+
* @since 4.0.0
|
|
173
173
|
*/
|
|
174
174
|
export const Shell = /*#__PURE__*/Tool.providerDefined({
|
|
175
175
|
id: "openai.shell",
|
|
@@ -188,8 +188,8 @@ export const Shell = /*#__PURE__*/Tool.providerDefined({
|
|
|
188
188
|
*
|
|
189
189
|
* Enables the model to search the web for information.
|
|
190
190
|
*
|
|
191
|
-
* @since 1.0.0
|
|
192
191
|
* @category tools
|
|
192
|
+
* @since 4.0.0
|
|
193
193
|
*/
|
|
194
194
|
export const WebSearch = /*#__PURE__*/Tool.providerDefined({
|
|
195
195
|
id: "openai.web_search",
|
|
@@ -213,8 +213,8 @@ export const WebSearch = /*#__PURE__*/Tool.providerDefined({
|
|
|
213
213
|
*
|
|
214
214
|
* Preview version of the web search tool with additional features.
|
|
215
215
|
*
|
|
216
|
-
* @since 1.0.0
|
|
217
216
|
* @category tools
|
|
217
|
+
* @since 4.0.0
|
|
218
218
|
*/
|
|
219
219
|
export const WebSearchPreview = /*#__PURE__*/Tool.providerDefined({
|
|
220
220
|
id: "openai.web_search_preview",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @since
|
|
2
|
+
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* @since
|
|
5
|
+
* @since 4.0.0
|
|
6
6
|
*/
|
|
7
7
|
export * as Generated from "./Generated.ts";
|
|
8
8
|
/**
|
|
@@ -11,15 +11,15 @@ export * as Generated from "./Generated.ts";
|
|
|
11
11
|
* Provides a type-safe, Effect-based client for OpenAI operations including
|
|
12
12
|
* completions, embeddings, and streaming responses.
|
|
13
13
|
*
|
|
14
|
-
* @since
|
|
14
|
+
* @since 4.0.0
|
|
15
15
|
*/
|
|
16
16
|
export * as OpenAiClient from "./OpenAiClient.ts";
|
|
17
17
|
/**
|
|
18
|
-
* @since
|
|
18
|
+
* @since 4.0.0
|
|
19
19
|
*/
|
|
20
20
|
export * as OpenAiClientGenerated from "./OpenAiClientGenerated.ts";
|
|
21
21
|
/**
|
|
22
|
-
* @since
|
|
22
|
+
* @since 4.0.0
|
|
23
23
|
*/
|
|
24
24
|
export * as OpenAiConfig from "./OpenAiConfig.ts";
|
|
25
25
|
/**
|
|
@@ -27,7 +27,7 @@ export * as OpenAiConfig from "./OpenAiConfig.ts";
|
|
|
27
27
|
*
|
|
28
28
|
* Provides an EmbeddingModel implementation for OpenAI's embeddings API.
|
|
29
29
|
*
|
|
30
|
-
* @since
|
|
30
|
+
* @since 4.0.0
|
|
31
31
|
*/
|
|
32
32
|
export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.ts";
|
|
33
33
|
/**
|
|
@@ -36,7 +36,7 @@ export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.ts";
|
|
|
36
36
|
* Provides OpenAI-specific metadata fields for AI error types through module
|
|
37
37
|
* augmentation, enabling typed access to OpenAI error details.
|
|
38
38
|
*
|
|
39
|
-
* @since
|
|
39
|
+
* @since 4.0.0
|
|
40
40
|
*/
|
|
41
41
|
export * as OpenAiError from "./OpenAiError.ts";
|
|
42
42
|
/**
|
|
@@ -45,13 +45,13 @@ export * as OpenAiError from "./OpenAiError.ts";
|
|
|
45
45
|
* Provides a LanguageModel implementation for OpenAI's responses API,
|
|
46
46
|
* supporting text generation, structured output, tool calling, and streaming.
|
|
47
47
|
*
|
|
48
|
-
* @since
|
|
48
|
+
* @since 4.0.0
|
|
49
49
|
*/
|
|
50
50
|
export * as OpenAiLanguageModel from "./OpenAiLanguageModel.ts";
|
|
51
51
|
/**
|
|
52
52
|
* Minimal local OpenAI schemas used by the handwritten Responses client path.
|
|
53
53
|
*
|
|
54
|
-
* @since
|
|
54
|
+
* @since 4.0.0
|
|
55
55
|
*/
|
|
56
56
|
export * as OpenAiSchema from "./OpenAiSchema.ts";
|
|
57
57
|
/**
|
|
@@ -61,7 +61,7 @@ export * as OpenAiSchema from "./OpenAiSchema.ts";
|
|
|
61
61
|
* semantic conventions, extending the base GenAI attributes with OpenAI-specific
|
|
62
62
|
* request and response metadata.
|
|
63
63
|
*
|
|
64
|
-
* @since
|
|
64
|
+
* @since 4.0.0
|
|
65
65
|
*/
|
|
66
66
|
export * as OpenAiTelemetry from "./OpenAiTelemetry.ts";
|
|
67
67
|
/**
|
|
@@ -70,7 +70,7 @@ export * as OpenAiTelemetry from "./OpenAiTelemetry.ts";
|
|
|
70
70
|
* Provides tools that are natively supported by OpenAI's API, including
|
|
71
71
|
* code interpreter, file search, and web search functionality.
|
|
72
72
|
*
|
|
73
|
-
* @since
|
|
73
|
+
* @since 4.0.0
|
|
74
74
|
*/
|
|
75
75
|
export * as OpenAiTool from "./OpenAiTool.ts";
|
|
76
76
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @since
|
|
2
|
+
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
// @barrel: Auto-generated exports. Do not edit manually.
|
|
5
5
|
/**
|
|
6
|
-
* @since
|
|
6
|
+
* @since 4.0.0
|
|
7
7
|
*/
|
|
8
8
|
export * as Generated from "./Generated.js";
|
|
9
9
|
/**
|
|
@@ -12,15 +12,15 @@ export * as Generated from "./Generated.js";
|
|
|
12
12
|
* Provides a type-safe, Effect-based client for OpenAI operations including
|
|
13
13
|
* completions, embeddings, and streaming responses.
|
|
14
14
|
*
|
|
15
|
-
* @since
|
|
15
|
+
* @since 4.0.0
|
|
16
16
|
*/
|
|
17
17
|
export * as OpenAiClient from "./OpenAiClient.js";
|
|
18
18
|
/**
|
|
19
|
-
* @since
|
|
19
|
+
* @since 4.0.0
|
|
20
20
|
*/
|
|
21
21
|
export * as OpenAiClientGenerated from "./OpenAiClientGenerated.js";
|
|
22
22
|
/**
|
|
23
|
-
* @since
|
|
23
|
+
* @since 4.0.0
|
|
24
24
|
*/
|
|
25
25
|
export * as OpenAiConfig from "./OpenAiConfig.js";
|
|
26
26
|
/**
|
|
@@ -28,7 +28,7 @@ export * as OpenAiConfig from "./OpenAiConfig.js";
|
|
|
28
28
|
*
|
|
29
29
|
* Provides an EmbeddingModel implementation for OpenAI's embeddings API.
|
|
30
30
|
*
|
|
31
|
-
* @since
|
|
31
|
+
* @since 4.0.0
|
|
32
32
|
*/
|
|
33
33
|
export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.js";
|
|
34
34
|
/**
|
|
@@ -37,7 +37,7 @@ export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.js";
|
|
|
37
37
|
* Provides OpenAI-specific metadata fields for AI error types through module
|
|
38
38
|
* augmentation, enabling typed access to OpenAI error details.
|
|
39
39
|
*
|
|
40
|
-
* @since
|
|
40
|
+
* @since 4.0.0
|
|
41
41
|
*/
|
|
42
42
|
export * as OpenAiError from "./OpenAiError.js";
|
|
43
43
|
/**
|
|
@@ -46,13 +46,13 @@ export * as OpenAiError from "./OpenAiError.js";
|
|
|
46
46
|
* Provides a LanguageModel implementation for OpenAI's responses API,
|
|
47
47
|
* supporting text generation, structured output, tool calling, and streaming.
|
|
48
48
|
*
|
|
49
|
-
* @since
|
|
49
|
+
* @since 4.0.0
|
|
50
50
|
*/
|
|
51
51
|
export * as OpenAiLanguageModel from "./OpenAiLanguageModel.js";
|
|
52
52
|
/**
|
|
53
53
|
* Minimal local OpenAI schemas used by the handwritten Responses client path.
|
|
54
54
|
*
|
|
55
|
-
* @since
|
|
55
|
+
* @since 4.0.0
|
|
56
56
|
*/
|
|
57
57
|
export * as OpenAiSchema from "./OpenAiSchema.js";
|
|
58
58
|
/**
|
|
@@ -62,7 +62,7 @@ export * as OpenAiSchema from "./OpenAiSchema.js";
|
|
|
62
62
|
* semantic conventions, extending the base GenAI attributes with OpenAI-specific
|
|
63
63
|
* request and response metadata.
|
|
64
64
|
*
|
|
65
|
-
* @since
|
|
65
|
+
* @since 4.0.0
|
|
66
66
|
*/
|
|
67
67
|
export * as OpenAiTelemetry from "./OpenAiTelemetry.js";
|
|
68
68
|
/**
|
|
@@ -71,7 +71,7 @@ export * as OpenAiTelemetry from "./OpenAiTelemetry.js";
|
|
|
71
71
|
* Provides tools that are natively supported by OpenAI's API, including
|
|
72
72
|
* code interpreter, file search, and web search functionality.
|
|
73
73
|
*
|
|
74
|
-
* @since
|
|
74
|
+
* @since 4.0.0
|
|
75
75
|
*/
|
|
76
76
|
export * as OpenAiTool from "./OpenAiTool.js";
|
|
77
77
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/ai-openai",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.67",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An OpenAI provider integration for Effect AI SDK",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"provenance": true
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"effect": "^4.0.0-beta.
|
|
46
|
+
"effect": "^4.0.0-beta.67"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"effect": "^4.0.0-beta.
|
|
49
|
+
"effect": "^4.0.0-beta.67"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"codegen": "effect-utils codegen",
|
package/src/Generated.ts
CHANGED
package/src/OpenAiClient.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides a type-safe, Effect-based client for OpenAI operations including
|
|
5
5
|
* completions, embeddings, and streaming responses.
|
|
6
6
|
*
|
|
7
|
-
* @since
|
|
7
|
+
* @since 4.0.0
|
|
8
8
|
*/
|
|
9
9
|
import * as Array from "effect/Array"
|
|
10
10
|
import type * as Config from "effect/Config"
|
|
@@ -39,10 +39,13 @@ import * as OpenAiSchema from "./OpenAiSchema.ts"
|
|
|
39
39
|
// =============================================================================
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Effect service interface for the handwritten OpenAI client.
|
|
43
|
+
*
|
|
44
|
+
* **Details**
|
|
45
|
+
* Provides the configured HTTP client plus helpers for Responses API calls, streaming Responses events, and embeddings. Transport and schema decoding failures are mapped to `AiError`.
|
|
43
46
|
*
|
|
44
|
-
* @since 1.0.0
|
|
45
47
|
* @category models
|
|
48
|
+
* @since 4.0.0
|
|
46
49
|
*/
|
|
47
50
|
export interface Service {
|
|
48
51
|
/**
|
|
@@ -88,8 +91,8 @@ export interface Service {
|
|
|
88
91
|
/**
|
|
89
92
|
* Service identifier for the OpenAI client.
|
|
90
93
|
*
|
|
91
|
-
* @since 1.0.0
|
|
92
94
|
* @category service
|
|
95
|
+
* @since 4.0.0
|
|
93
96
|
*/
|
|
94
97
|
export class OpenAiClient extends Context.Service<OpenAiClient, Service>()(
|
|
95
98
|
"@effect/ai-openai/OpenAiClient"
|
|
@@ -102,8 +105,8 @@ export class OpenAiClient extends Context.Service<OpenAiClient, Service>()(
|
|
|
102
105
|
/**
|
|
103
106
|
* Options for configuring the OpenAI client.
|
|
104
107
|
*
|
|
105
|
-
* @since 1.0.0
|
|
106
108
|
* @category models
|
|
109
|
+
* @since 4.0.0
|
|
107
110
|
*/
|
|
108
111
|
export type Options = {
|
|
109
112
|
/**
|
|
@@ -146,8 +149,8 @@ const RedactedOpenAiHeaders = {
|
|
|
146
149
|
/**
|
|
147
150
|
* Creates an OpenAI client service with the given options.
|
|
148
151
|
*
|
|
149
|
-
* @since 1.0.0
|
|
150
152
|
* @category constructors
|
|
153
|
+
* @since 4.0.0
|
|
151
154
|
*/
|
|
152
155
|
export const make = Effect.fnUntraced(
|
|
153
156
|
function*(
|
|
@@ -298,8 +301,8 @@ export const make = Effect.fnUntraced(
|
|
|
298
301
|
/**
|
|
299
302
|
* Creates a layer for the OpenAI client with the given options.
|
|
300
303
|
*
|
|
301
|
-
* @since 1.0.0
|
|
302
304
|
* @category layers
|
|
305
|
+
* @since 4.0.0
|
|
303
306
|
*/
|
|
304
307
|
export const layer = (options: Options): Layer.Layer<OpenAiClient, never, HttpClient.HttpClient> =>
|
|
305
308
|
Layer.effect(OpenAiClient, make(options))
|
|
@@ -308,8 +311,8 @@ export const layer = (options: Options): Layer.Layer<OpenAiClient, never, HttpCl
|
|
|
308
311
|
* Creates a layer for the OpenAI client, loading the requisite configuration
|
|
309
312
|
* via Effect's `Config` module.
|
|
310
313
|
*
|
|
311
|
-
* @since 1.0.0
|
|
312
314
|
* @category layers
|
|
315
|
+
* @since 4.0.0
|
|
313
316
|
*/
|
|
314
317
|
export const layerConfig = (options?: {
|
|
315
318
|
/**
|
|
@@ -367,14 +370,18 @@ export const layerConfig = (options?: {
|
|
|
367
370
|
// =============================================================================
|
|
368
371
|
|
|
369
372
|
/**
|
|
370
|
-
*
|
|
373
|
+
* Response stream event emitted by the OpenAI Responses API.
|
|
374
|
+
*
|
|
371
375
|
* @category Events
|
|
376
|
+
* @since 4.0.0
|
|
372
377
|
*/
|
|
373
378
|
export type ResponseStreamEvent = typeof OpenAiSchema.ResponseStreamEvent.Type
|
|
374
379
|
|
|
375
380
|
/**
|
|
376
|
-
*
|
|
381
|
+
* Service for creating OpenAI response streams over a WebSocket connection.
|
|
382
|
+
*
|
|
377
383
|
* @category Websocket mode
|
|
384
|
+
* @since 4.0.0
|
|
378
385
|
*/
|
|
379
386
|
export class OpenAiSocket extends Context.Service<OpenAiSocket, {
|
|
380
387
|
/**
|
|
@@ -587,8 +594,8 @@ const decodeEvent = Schema.decodeUnknownSync(Schema.fromJsonString(AllEvents))
|
|
|
587
594
|
* This is because it needs to use non-standard options for setting the
|
|
588
595
|
* Authorization header.
|
|
589
596
|
*
|
|
590
|
-
* @since 1.0.0
|
|
591
597
|
* @category Websocket mode
|
|
598
|
+
* @since 4.0.0
|
|
592
599
|
*/
|
|
593
600
|
export const withWebSocketMode = <A, E, R>(
|
|
594
601
|
effect: Effect.Effect<A, E, R>
|
|
@@ -615,8 +622,8 @@ export const withWebSocketMode = <A, E, R>(
|
|
|
615
622
|
* This is because it needs to use non-standard options for setting the
|
|
616
623
|
* Authorization header.
|
|
617
624
|
*
|
|
618
|
-
* @since 1.0.0
|
|
619
625
|
* @category Websocket mode
|
|
626
|
+
* @since 4.0.0
|
|
620
627
|
*/
|
|
621
628
|
export const layerWebSocketMode: Layer.Layer<
|
|
622
629
|
OpenAiSocket | ResponseIdTracker.ResponseIdTracker,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @since
|
|
2
|
+
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
import * as Array from "effect/Array"
|
|
5
5
|
import type * as Config from "effect/Config"
|
|
@@ -23,7 +23,7 @@ import { OpenAiConfig } from "./OpenAiConfig.ts"
|
|
|
23
23
|
/**
|
|
24
24
|
* Service identifier for the generated OpenAI client.
|
|
25
25
|
*
|
|
26
|
-
* @since
|
|
26
|
+
* @since 4.0.0
|
|
27
27
|
* @category service
|
|
28
28
|
*/
|
|
29
29
|
export class OpenAiClientGenerated extends Context.Service<OpenAiClientGenerated, Generated.OpenAiClient>()(
|
|
@@ -37,7 +37,7 @@ export class OpenAiClientGenerated extends Context.Service<OpenAiClientGenerated
|
|
|
37
37
|
/**
|
|
38
38
|
* Options for configuring the generated OpenAI client.
|
|
39
39
|
*
|
|
40
|
-
* @since
|
|
40
|
+
* @since 4.0.0
|
|
41
41
|
* @category models
|
|
42
42
|
*/
|
|
43
43
|
export type Options = {
|
|
@@ -81,7 +81,7 @@ const RedactedOpenAiHeaders = {
|
|
|
81
81
|
/**
|
|
82
82
|
* Creates a generated OpenAI client service with the given options.
|
|
83
83
|
*
|
|
84
|
-
* @since
|
|
84
|
+
* @since 4.0.0
|
|
85
85
|
* @category constructors
|
|
86
86
|
*/
|
|
87
87
|
export const make = Effect.fnUntraced(
|
|
@@ -137,7 +137,7 @@ export const make = Effect.fnUntraced(
|
|
|
137
137
|
/**
|
|
138
138
|
* Creates a layer for the generated OpenAI client with the given options.
|
|
139
139
|
*
|
|
140
|
-
* @since
|
|
140
|
+
* @since 4.0.0
|
|
141
141
|
* @category layers
|
|
142
142
|
*/
|
|
143
143
|
export const layer = (options: Options): Layer.Layer<OpenAiClientGenerated, never, HttpClient.HttpClient> =>
|
|
@@ -147,7 +147,7 @@ export const layer = (options: Options): Layer.Layer<OpenAiClientGenerated, neve
|
|
|
147
147
|
* Creates a layer for the generated OpenAI client, loading the requisite
|
|
148
148
|
* configuration via Effect's `Config` module.
|
|
149
149
|
*
|
|
150
|
-
* @since
|
|
150
|
+
* @since 4.0.0
|
|
151
151
|
* @category layers
|
|
152
152
|
*/
|
|
153
153
|
export const layerConfig = (options?: {
|