@effect/ai-openai 4.0.0-beta.70 → 4.0.0-beta.72
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/OpenAiClient.d.ts +88 -4
- package/dist/OpenAiClient.d.ts.map +1 -1
- package/dist/OpenAiClient.js +127 -8
- package/dist/OpenAiClient.js.map +1 -1
- package/dist/OpenAiConfig.d.ts +85 -17
- package/dist/OpenAiConfig.d.ts.map +1 -1
- package/dist/OpenAiConfig.js +53 -17
- package/dist/OpenAiConfig.js.map +1 -1
- package/dist/OpenAiEmbeddingModel.d.ts +127 -3
- package/dist/OpenAiEmbeddingModel.d.ts.map +1 -1
- package/dist/OpenAiEmbeddingModel.js +101 -3
- package/dist/OpenAiEmbeddingModel.js.map +1 -1
- package/dist/OpenAiLanguageModel.d.ts +139 -10
- package/dist/OpenAiLanguageModel.d.ts.map +1 -1
- package/dist/OpenAiLanguageModel.js +107 -8
- package/dist/OpenAiLanguageModel.js.map +1 -1
- package/dist/OpenAiSchema.d.ts +281 -12
- package/dist/OpenAiSchema.d.ts.map +1 -1
- package/dist/OpenAiSchema.js +227 -4
- package/dist/OpenAiSchema.js.map +1 -1
- package/dist/OpenAiTelemetry.d.ts +29 -1
- package/dist/OpenAiTelemetry.d.ts.map +1 -1
- package/dist/OpenAiTelemetry.js +29 -4
- package/dist/OpenAiTelemetry.js.map +1 -1
- package/dist/OpenAiTool.d.ts +130 -15
- package/dist/OpenAiTool.d.ts.map +1 -1
- package/dist/OpenAiTool.js +130 -15
- package/dist/OpenAiTool.js.map +1 -1
- package/dist/index.d.ts +1 -49
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -49
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/OpenAiClient.ts +129 -9
- package/src/OpenAiConfig.ts +85 -17
- package/src/OpenAiEmbeddingModel.ts +153 -3
- package/src/OpenAiLanguageModel.ts +171 -12
- package/src/OpenAiSchema.ts +309 -4
- package/src/OpenAiTelemetry.ts +50 -5
- package/src/OpenAiTool.ts +130 -15
- package/src/index.ts +1 -49
package/dist/OpenAiTool.d.ts
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenAI provider-defined tools for
|
|
2
|
+
* OpenAI provider-defined tools for Effect AI language model requests.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* This module exposes typed descriptors for OpenAI tools such as code
|
|
5
|
+
* interpreter, file search, image generation, MCP, web search, and shell-like
|
|
6
|
+
* local tools. Each descriptor captures the OpenAI provider name, user-facing
|
|
7
|
+
* configuration arguments, provider call parameters, success output schema, and
|
|
8
|
+
* whether the tool call needs an application-provided handler.
|
|
9
|
+
*
|
|
10
|
+
* **Mental model**
|
|
11
|
+
*
|
|
12
|
+
* Provider-defined tools are not implementations of the capability themselves.
|
|
13
|
+
* They are schemas and metadata that tell the language model provider which
|
|
14
|
+
* tool to make available and tell Effect AI how to decode any tool calls or
|
|
15
|
+
* tool results that come back.
|
|
16
|
+
*
|
|
17
|
+
* **Common tasks**
|
|
18
|
+
*
|
|
19
|
+
* Use hosted or provider-routed tools such as {@link CodeInterpreter},
|
|
20
|
+
* {@link FileSearch}, {@link ImageGeneration}, {@link Mcp}, {@link WebSearch},
|
|
21
|
+
* and {@link WebSearchPreview} to opt into OpenAI-managed capabilities. Use
|
|
22
|
+
* handler-required tools such as {@link ApplyPatch}, {@link Shell}, and
|
|
23
|
+
* {@link LocalShell} only when your application is prepared to execute the
|
|
24
|
+
* requested local operation and enforce its own safety policy.
|
|
6
25
|
*
|
|
7
26
|
* @since 4.0.0
|
|
8
27
|
*/
|
|
@@ -16,10 +35,16 @@ import * as Tool from "effect/unstable/ai/Tool";
|
|
|
16
35
|
*/
|
|
17
36
|
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
37
|
/**
|
|
19
|
-
* OpenAI Apply Patch tool that allows the model to apply diffs by creating,
|
|
38
|
+
* Defines the OpenAI Apply Patch tool that allows the model to apply diffs by creating,
|
|
20
39
|
* deleting, or updating files. This local tool runs in your environment and
|
|
21
40
|
* requires a handler to execute file operations.
|
|
22
41
|
*
|
|
42
|
+
* **When to use**
|
|
43
|
+
*
|
|
44
|
+
* Use when you want an OpenAI model to request structured file edits as create,
|
|
45
|
+
* delete, or update operations that your application executes through a local
|
|
46
|
+
* handler.
|
|
47
|
+
*
|
|
23
48
|
* @category tools
|
|
24
49
|
* @since 4.0.0
|
|
25
50
|
*/
|
|
@@ -50,9 +75,19 @@ export declare const ApplyPatch: <Mode extends Tool.FailureMode | undefined = un
|
|
|
50
75
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
51
76
|
}, true>;
|
|
52
77
|
/**
|
|
53
|
-
* OpenAI Code Interpreter tool that allows the model to execute Python code in
|
|
78
|
+
* Defines the OpenAI Code Interpreter tool that allows the model to execute Python code in
|
|
54
79
|
* a sandboxed environment.
|
|
55
80
|
*
|
|
81
|
+
* **When to use**
|
|
82
|
+
*
|
|
83
|
+
* Use to enable OpenAI-hosted Python execution for a model response.
|
|
84
|
+
*
|
|
85
|
+
* **Details**
|
|
86
|
+
*
|
|
87
|
+
* The tool is configured with a `container` argument. Successful tool calls
|
|
88
|
+
* expose `outputs`, which may contain logs or generated images, or `null` when
|
|
89
|
+
* no outputs are available.
|
|
90
|
+
*
|
|
56
91
|
* @category tools
|
|
57
92
|
* @since 4.0.0
|
|
58
93
|
*/
|
|
@@ -109,9 +144,20 @@ export declare const CodeInterpreter: <Mode extends Tool.FailureMode | undefined
|
|
|
109
144
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
110
145
|
}, false>;
|
|
111
146
|
/**
|
|
112
|
-
* OpenAI File Search tool that enables the model to search through uploaded
|
|
147
|
+
* Defines the OpenAI File Search tool that enables the model to search through uploaded
|
|
113
148
|
* files and vector stores.
|
|
114
149
|
*
|
|
150
|
+
* **When to use**
|
|
151
|
+
*
|
|
152
|
+
* Use to let an OpenAI model search uploaded files through one or more vector
|
|
153
|
+
* stores.
|
|
154
|
+
*
|
|
155
|
+
* **Details**
|
|
156
|
+
*
|
|
157
|
+
* The tool requires `vector_store_ids` and accepts optional `filters`,
|
|
158
|
+
* `max_num_results`, and `ranking_options`. Successful tool calls expose the
|
|
159
|
+
* search `status`, generated `queries`, and optional `results`.
|
|
160
|
+
*
|
|
115
161
|
* @category tools
|
|
116
162
|
* @since 4.0.0
|
|
117
163
|
*/
|
|
@@ -175,9 +221,21 @@ export declare const FileSearch: <Mode extends Tool.FailureMode | undefined = un
|
|
|
175
221
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
176
222
|
}, false>;
|
|
177
223
|
/**
|
|
178
|
-
* OpenAI Image Generation tool that enables the model to generate images using
|
|
224
|
+
* Defines the OpenAI Image Generation tool that enables the model to generate images using
|
|
179
225
|
* the GPT image models.
|
|
180
226
|
*
|
|
227
|
+
* **When to use**
|
|
228
|
+
*
|
|
229
|
+
* Use to enable OpenAI provider-defined image generation through a language
|
|
230
|
+
* model response.
|
|
231
|
+
*
|
|
232
|
+
* **Details**
|
|
233
|
+
*
|
|
234
|
+
* The tool configures the `image_generation` provider tool, including model,
|
|
235
|
+
* size, quality, output format, moderation, background, input-image options,
|
|
236
|
+
* and partial image settings. Successful tool calls expose `result` as base64
|
|
237
|
+
* image data or `null`.
|
|
238
|
+
*
|
|
181
239
|
* @category tools
|
|
182
240
|
* @since 4.0.0
|
|
183
241
|
*/
|
|
@@ -219,10 +277,21 @@ export declare const ImageGeneration: <Mode extends Tool.FailureMode | undefined
|
|
|
219
277
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
220
278
|
}, false>;
|
|
221
279
|
/**
|
|
222
|
-
* OpenAI Local Shell tool that enables the model to run a command with a local
|
|
280
|
+
* Defines the OpenAI Local Shell tool that enables the model to run a command with a local
|
|
223
281
|
* shell. This local tool runs in your environment and requires a handler to
|
|
224
282
|
* execute commands.
|
|
225
283
|
*
|
|
284
|
+
* **When to use**
|
|
285
|
+
*
|
|
286
|
+
* Use to let an OpenAI model request local shell commands that your application
|
|
287
|
+
* executes through a handler.
|
|
288
|
+
*
|
|
289
|
+
* **Details**
|
|
290
|
+
*
|
|
291
|
+
* The tool exposes a provider-defined `local_shell` call. It is marked as
|
|
292
|
+
* handler-required, so applications must provide the command execution policy
|
|
293
|
+
* and implementation.
|
|
294
|
+
*
|
|
226
295
|
* @category tools
|
|
227
296
|
* @since 4.0.0
|
|
228
297
|
*/
|
|
@@ -247,9 +316,25 @@ export declare const LocalShell: <Mode extends Tool.FailureMode | undefined = un
|
|
|
247
316
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
248
317
|
}, true>;
|
|
249
318
|
/**
|
|
250
|
-
* OpenAI MCP tool that gives the model access to additional tools via remote
|
|
319
|
+
* Defines the OpenAI MCP tool that gives the model access to additional tools via remote
|
|
251
320
|
* Model Context Protocol (MCP) servers.
|
|
252
321
|
*
|
|
322
|
+
* **When to use**
|
|
323
|
+
*
|
|
324
|
+
* Use to let an OpenAI model call tools exposed by a remote MCP server.
|
|
325
|
+
*
|
|
326
|
+
* **Details**
|
|
327
|
+
*
|
|
328
|
+
* The tool accepts MCP server configuration such as allowed tools,
|
|
329
|
+
* authorization, connector id, approval requirements, server metadata, and
|
|
330
|
+
* server URL. Tool call results include the called tool name, arguments, output,
|
|
331
|
+
* error, and server label.
|
|
332
|
+
*
|
|
333
|
+
* **Gotchas**
|
|
334
|
+
*
|
|
335
|
+
* This schema leaves both `server_url` and `connector_id` optional, but OpenAI
|
|
336
|
+
* may require a server URL or connector id for a usable MCP tool configuration.
|
|
337
|
+
*
|
|
253
338
|
* @category tools
|
|
254
339
|
* @since 4.0.0
|
|
255
340
|
*/
|
|
@@ -308,9 +393,18 @@ export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined
|
|
|
308
393
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
309
394
|
}, false>;
|
|
310
395
|
/**
|
|
311
|
-
* OpenAI
|
|
312
|
-
*
|
|
313
|
-
*
|
|
396
|
+
* Defines the OpenAI shell tool for model-requested command execution.
|
|
397
|
+
*
|
|
398
|
+
* **When to use**
|
|
399
|
+
*
|
|
400
|
+
* Use to let an OpenAI model request shell commands that your application
|
|
401
|
+
* executes through a handler.
|
|
402
|
+
*
|
|
403
|
+
* **Details**
|
|
404
|
+
*
|
|
405
|
+
* The tool exposes a provider-defined `shell` call. It is marked as
|
|
406
|
+
* handler-required, so applications must provide the command execution policy
|
|
407
|
+
* and implementation.
|
|
314
408
|
*
|
|
315
409
|
* @category tools
|
|
316
410
|
* @since 4.0.0
|
|
@@ -343,9 +437,20 @@ export declare const Shell: <Mode extends Tool.FailureMode | undefined = undefin
|
|
|
343
437
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
344
438
|
}, true>;
|
|
345
439
|
/**
|
|
346
|
-
* OpenAI Web Search tool that enables the model to search the web for
|
|
440
|
+
* Defines the OpenAI Web Search tool that enables the model to search the web for
|
|
347
441
|
* information.
|
|
348
442
|
*
|
|
443
|
+
* **When to use**
|
|
444
|
+
*
|
|
445
|
+
* Use to enable OpenAI provider-defined web search for a model response.
|
|
446
|
+
*
|
|
447
|
+
* **Details**
|
|
448
|
+
*
|
|
449
|
+
* The tool accepts optional filters, user location, and search context size.
|
|
450
|
+
* Successful calls expose the performed search action and status.
|
|
451
|
+
*
|
|
452
|
+
* @see {@link WebSearchPreview} for the preview web search provider tool
|
|
453
|
+
*
|
|
349
454
|
* @category tools
|
|
350
455
|
* @since 4.0.0
|
|
351
456
|
*/
|
|
@@ -416,8 +521,18 @@ export declare const WebSearch: <Mode extends Tool.FailureMode | undefined = und
|
|
|
416
521
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
417
522
|
}, false>;
|
|
418
523
|
/**
|
|
419
|
-
* OpenAI Web Search
|
|
420
|
-
*
|
|
524
|
+
* Defines the OpenAI preview Web Search tool for model responses.
|
|
525
|
+
*
|
|
526
|
+
* **When to use**
|
|
527
|
+
*
|
|
528
|
+
* Use to enable the preview OpenAI web search provider tool.
|
|
529
|
+
*
|
|
530
|
+
* **Details**
|
|
531
|
+
*
|
|
532
|
+
* The preview tool accepts optional user location and search context size, then
|
|
533
|
+
* exposes the performed search action and status in successful calls.
|
|
534
|
+
*
|
|
535
|
+
* @see {@link WebSearch} for the stable web search provider tool
|
|
421
536
|
*
|
|
422
537
|
* @category tools
|
|
423
538
|
* @since 4.0.0
|
package/dist/OpenAiTool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiTool.d.ts","sourceRoot":"","sources":["../src/OpenAiTool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OpenAiTool.d.ts","sourceRoot":"","sources":["../src/OpenAiTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAA;AAG/C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,CAAC,OAAO,UAAU,CAAC,GAC7B,UAAU,CAAC,OAAO,eAAe,CAAC,GAClC,UAAU,CAAC,OAAO,UAAU,CAAC,GAC7B,UAAU,CAAC,OAAO,KAAK,CAAC,GACxB,UAAU,CAAC,OAAO,eAAe,CAAC,GAClC,UAAU,CAAC,OAAO,UAAU,CAAC,GAC7B,UAAU,CAAC,OAAO,GAAG,CAAC,GACtB,UAAU,CAAC,OAAO,SAAS,CAAC,GAC5B,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEvC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;QAarB,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAc1B,CAAA;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAerB,CAAA;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAmB1B,CAAA;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;QAWrB,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAsBd,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;QAWhB,CAAA;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAgBpB,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAY3B,CAAA"}
|
package/dist/OpenAiTool.js
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenAI provider-defined tools for
|
|
2
|
+
* OpenAI provider-defined tools for Effect AI language model requests.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* This module exposes typed descriptors for OpenAI tools such as code
|
|
5
|
+
* interpreter, file search, image generation, MCP, web search, and shell-like
|
|
6
|
+
* local tools. Each descriptor captures the OpenAI provider name, user-facing
|
|
7
|
+
* configuration arguments, provider call parameters, success output schema, and
|
|
8
|
+
* whether the tool call needs an application-provided handler.
|
|
9
|
+
*
|
|
10
|
+
* **Mental model**
|
|
11
|
+
*
|
|
12
|
+
* Provider-defined tools are not implementations of the capability themselves.
|
|
13
|
+
* They are schemas and metadata that tell the language model provider which
|
|
14
|
+
* tool to make available and tell Effect AI how to decode any tool calls or
|
|
15
|
+
* tool results that come back.
|
|
16
|
+
*
|
|
17
|
+
* **Common tasks**
|
|
18
|
+
*
|
|
19
|
+
* Use hosted or provider-routed tools such as {@link CodeInterpreter},
|
|
20
|
+
* {@link FileSearch}, {@link ImageGeneration}, {@link Mcp}, {@link WebSearch},
|
|
21
|
+
* and {@link WebSearchPreview} to opt into OpenAI-managed capabilities. Use
|
|
22
|
+
* handler-required tools such as {@link ApplyPatch}, {@link Shell}, and
|
|
23
|
+
* {@link LocalShell} only when your application is prepared to execute the
|
|
24
|
+
* requested local operation and enforce its own safety policy.
|
|
6
25
|
*
|
|
7
26
|
* @since 4.0.0
|
|
8
27
|
*/
|
|
@@ -10,10 +29,16 @@ import * as Schema from "effect/Schema";
|
|
|
10
29
|
import * as Tool from "effect/unstable/ai/Tool";
|
|
11
30
|
import * as Generated from "./Generated.js";
|
|
12
31
|
/**
|
|
13
|
-
* OpenAI Apply Patch tool that allows the model to apply diffs by creating,
|
|
32
|
+
* Defines the OpenAI Apply Patch tool that allows the model to apply diffs by creating,
|
|
14
33
|
* deleting, or updating files. This local tool runs in your environment and
|
|
15
34
|
* requires a handler to execute file operations.
|
|
16
35
|
*
|
|
36
|
+
* **When to use**
|
|
37
|
+
*
|
|
38
|
+
* Use when you want an OpenAI model to request structured file edits as create,
|
|
39
|
+
* delete, or update operations that your application executes through a local
|
|
40
|
+
* handler.
|
|
41
|
+
*
|
|
17
42
|
* @category tools
|
|
18
43
|
* @since 4.0.0
|
|
19
44
|
*/
|
|
@@ -32,9 +57,19 @@ export const ApplyPatch = /*#__PURE__*/Tool.providerDefined({
|
|
|
32
57
|
})
|
|
33
58
|
});
|
|
34
59
|
/**
|
|
35
|
-
* OpenAI Code Interpreter tool that allows the model to execute Python code in
|
|
60
|
+
* Defines the OpenAI Code Interpreter tool that allows the model to execute Python code in
|
|
36
61
|
* a sandboxed environment.
|
|
37
62
|
*
|
|
63
|
+
* **When to use**
|
|
64
|
+
*
|
|
65
|
+
* Use to enable OpenAI-hosted Python execution for a model response.
|
|
66
|
+
*
|
|
67
|
+
* **Details**
|
|
68
|
+
*
|
|
69
|
+
* The tool is configured with a `container` argument. Successful tool calls
|
|
70
|
+
* expose `outputs`, which may contain logs or generated images, or `null` when
|
|
71
|
+
* no outputs are available.
|
|
72
|
+
*
|
|
38
73
|
* @category tools
|
|
39
74
|
* @since 4.0.0
|
|
40
75
|
*/
|
|
@@ -54,9 +89,20 @@ export const CodeInterpreter = /*#__PURE__*/Tool.providerDefined({
|
|
|
54
89
|
})
|
|
55
90
|
});
|
|
56
91
|
/**
|
|
57
|
-
* OpenAI File Search tool that enables the model to search through uploaded
|
|
92
|
+
* Defines the OpenAI File Search tool that enables the model to search through uploaded
|
|
58
93
|
* files and vector stores.
|
|
59
94
|
*
|
|
95
|
+
* **When to use**
|
|
96
|
+
*
|
|
97
|
+
* Use to let an OpenAI model search uploaded files through one or more vector
|
|
98
|
+
* stores.
|
|
99
|
+
*
|
|
100
|
+
* **Details**
|
|
101
|
+
*
|
|
102
|
+
* The tool requires `vector_store_ids` and accepts optional `filters`,
|
|
103
|
+
* `max_num_results`, and `ranking_options`. Successful tool calls expose the
|
|
104
|
+
* search `status`, generated `queries`, and optional `results`.
|
|
105
|
+
*
|
|
60
106
|
* @category tools
|
|
61
107
|
* @since 4.0.0
|
|
62
108
|
*/
|
|
@@ -77,9 +123,21 @@ export const FileSearch = /*#__PURE__*/Tool.providerDefined({
|
|
|
77
123
|
})
|
|
78
124
|
});
|
|
79
125
|
/**
|
|
80
|
-
* OpenAI Image Generation tool that enables the model to generate images using
|
|
126
|
+
* Defines the OpenAI Image Generation tool that enables the model to generate images using
|
|
81
127
|
* the GPT image models.
|
|
82
128
|
*
|
|
129
|
+
* **When to use**
|
|
130
|
+
*
|
|
131
|
+
* Use to enable OpenAI provider-defined image generation through a language
|
|
132
|
+
* model response.
|
|
133
|
+
*
|
|
134
|
+
* **Details**
|
|
135
|
+
*
|
|
136
|
+
* The tool configures the `image_generation` provider tool, including model,
|
|
137
|
+
* size, quality, output format, moderation, background, input-image options,
|
|
138
|
+
* and partial image settings. Successful tool calls expose `result` as base64
|
|
139
|
+
* image data or `null`.
|
|
140
|
+
*
|
|
83
141
|
* @category tools
|
|
84
142
|
* @since 4.0.0
|
|
85
143
|
*/
|
|
@@ -104,10 +162,21 @@ export const ImageGeneration = /*#__PURE__*/Tool.providerDefined({
|
|
|
104
162
|
})
|
|
105
163
|
});
|
|
106
164
|
/**
|
|
107
|
-
* OpenAI Local Shell tool that enables the model to run a command with a local
|
|
165
|
+
* Defines the OpenAI Local Shell tool that enables the model to run a command with a local
|
|
108
166
|
* shell. This local tool runs in your environment and requires a handler to
|
|
109
167
|
* execute commands.
|
|
110
168
|
*
|
|
169
|
+
* **When to use**
|
|
170
|
+
*
|
|
171
|
+
* Use to let an OpenAI model request local shell commands that your application
|
|
172
|
+
* executes through a handler.
|
|
173
|
+
*
|
|
174
|
+
* **Details**
|
|
175
|
+
*
|
|
176
|
+
* The tool exposes a provider-defined `local_shell` call. It is marked as
|
|
177
|
+
* handler-required, so applications must provide the command execution policy
|
|
178
|
+
* and implementation.
|
|
179
|
+
*
|
|
111
180
|
* @category tools
|
|
112
181
|
* @since 4.0.0
|
|
113
182
|
*/
|
|
@@ -124,9 +193,25 @@ export const LocalShell = /*#__PURE__*/Tool.providerDefined({
|
|
|
124
193
|
})
|
|
125
194
|
});
|
|
126
195
|
/**
|
|
127
|
-
* OpenAI MCP tool that gives the model access to additional tools via remote
|
|
196
|
+
* Defines the OpenAI MCP tool that gives the model access to additional tools via remote
|
|
128
197
|
* Model Context Protocol (MCP) servers.
|
|
129
198
|
*
|
|
199
|
+
* **When to use**
|
|
200
|
+
*
|
|
201
|
+
* Use to let an OpenAI model call tools exposed by a remote MCP server.
|
|
202
|
+
*
|
|
203
|
+
* **Details**
|
|
204
|
+
*
|
|
205
|
+
* The tool accepts MCP server configuration such as allowed tools,
|
|
206
|
+
* authorization, connector id, approval requirements, server metadata, and
|
|
207
|
+
* server URL. Tool call results include the called tool name, arguments, output,
|
|
208
|
+
* error, and server label.
|
|
209
|
+
*
|
|
210
|
+
* **Gotchas**
|
|
211
|
+
*
|
|
212
|
+
* This schema leaves both `server_url` and `connector_id` optional, but OpenAI
|
|
213
|
+
* may require a server URL or connector id for a usable MCP tool configuration.
|
|
214
|
+
*
|
|
130
215
|
* @category tools
|
|
131
216
|
* @since 4.0.0
|
|
132
217
|
*/
|
|
@@ -154,9 +239,18 @@ export const Mcp = /*#__PURE__*/Tool.providerDefined({
|
|
|
154
239
|
})
|
|
155
240
|
});
|
|
156
241
|
/**
|
|
157
|
-
* OpenAI
|
|
158
|
-
*
|
|
159
|
-
*
|
|
242
|
+
* Defines the OpenAI shell tool for model-requested command execution.
|
|
243
|
+
*
|
|
244
|
+
* **When to use**
|
|
245
|
+
*
|
|
246
|
+
* Use to let an OpenAI model request shell commands that your application
|
|
247
|
+
* executes through a handler.
|
|
248
|
+
*
|
|
249
|
+
* **Details**
|
|
250
|
+
*
|
|
251
|
+
* The tool exposes a provider-defined `shell` call. It is marked as
|
|
252
|
+
* handler-required, so applications must provide the command execution policy
|
|
253
|
+
* and implementation.
|
|
160
254
|
*
|
|
161
255
|
* @category tools
|
|
162
256
|
* @since 4.0.0
|
|
@@ -174,9 +268,20 @@ export const Shell = /*#__PURE__*/Tool.providerDefined({
|
|
|
174
268
|
})
|
|
175
269
|
});
|
|
176
270
|
/**
|
|
177
|
-
* OpenAI Web Search tool that enables the model to search the web for
|
|
271
|
+
* Defines the OpenAI Web Search tool that enables the model to search the web for
|
|
178
272
|
* information.
|
|
179
273
|
*
|
|
274
|
+
* **When to use**
|
|
275
|
+
*
|
|
276
|
+
* Use to enable OpenAI provider-defined web search for a model response.
|
|
277
|
+
*
|
|
278
|
+
* **Details**
|
|
279
|
+
*
|
|
280
|
+
* The tool accepts optional filters, user location, and search context size.
|
|
281
|
+
* Successful calls expose the performed search action and status.
|
|
282
|
+
*
|
|
283
|
+
* @see {@link WebSearchPreview} for the preview web search provider tool
|
|
284
|
+
*
|
|
180
285
|
* @category tools
|
|
181
286
|
* @since 4.0.0
|
|
182
287
|
*/
|
|
@@ -198,8 +303,18 @@ export const WebSearch = /*#__PURE__*/Tool.providerDefined({
|
|
|
198
303
|
})
|
|
199
304
|
});
|
|
200
305
|
/**
|
|
201
|
-
* OpenAI Web Search
|
|
202
|
-
*
|
|
306
|
+
* Defines the OpenAI preview Web Search tool for model responses.
|
|
307
|
+
*
|
|
308
|
+
* **When to use**
|
|
309
|
+
*
|
|
310
|
+
* Use to enable the preview OpenAI web search provider tool.
|
|
311
|
+
*
|
|
312
|
+
* **Details**
|
|
313
|
+
*
|
|
314
|
+
* The preview tool accepts optional user location and search context size, then
|
|
315
|
+
* exposes the performed search action and status in successful calls.
|
|
316
|
+
*
|
|
317
|
+
* @see {@link WebSearch} for the stable web search provider tool
|
|
203
318
|
*
|
|
204
319
|
* @category tools
|
|
205
320
|
* @since 4.0.0
|
package/dist/OpenAiTool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiTool.js","names":["Schema","Tool","Generated","ApplyPatch","providerDefined","id","customName","providerName","requiresHandler","parameters","Struct","call_id","ApplyPatchToolCall","fields","operation","success","status","ApplyPatchToolCallOutput","output","CodeInterpreter","args","container","CodeInterpreterTool","code","CodeInterpreterToolCall","container_id","outputs","FileSearch","filters","FileSearchTool","max_num_results","ranking_options","vector_store_ids","FileSearchToolCall","queries","results","ImageGeneration","background","ImageGenTool","input_fidelity","input_image_mask","model","moderation","output_compression","output_format","partial_images","quality","size","result","ImageGenToolCall","LocalShell","action","LocalShellToolCall","LocalShellToolCallOutput","Mcp","allowed_tools","MCPTool","authorization","connector_id","require_approval","server_description","server_label","server_url","Unknown","type","MCPToolCall","name","arguments","error","Shell","FunctionShellCall","FunctionShellCallOutput","WebSearch","WebSearchTool","user_location","search_context_size","WebSearchToolCall","WebSearchPreview","WebSearchPreviewTool"],"sources":["../src/OpenAiTool.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OpenAiTool.js","names":["Schema","Tool","Generated","ApplyPatch","providerDefined","id","customName","providerName","requiresHandler","parameters","Struct","call_id","ApplyPatchToolCall","fields","operation","success","status","ApplyPatchToolCallOutput","output","CodeInterpreter","args","container","CodeInterpreterTool","code","CodeInterpreterToolCall","container_id","outputs","FileSearch","filters","FileSearchTool","max_num_results","ranking_options","vector_store_ids","FileSearchToolCall","queries","results","ImageGeneration","background","ImageGenTool","input_fidelity","input_image_mask","model","moderation","output_compression","output_format","partial_images","quality","size","result","ImageGenToolCall","LocalShell","action","LocalShellToolCall","LocalShellToolCallOutput","Mcp","allowed_tools","MCPTool","authorization","connector_id","require_approval","server_description","server_label","server_url","Unknown","type","MCPToolCall","name","arguments","error","Shell","FunctionShellCall","FunctionShellCallOutput","WebSearch","WebSearchTool","user_location","search_context_size","WebSearchToolCall","WebSearchPreview","WebSearchPreviewTool"],"sources":["../src/OpenAiTool.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,yBAAyB;AAC/C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAmB3C;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,UAAU,gBAAGF,IAAI,CAACG,eAAe,CAAC;EAC7CC,EAAE,EA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C,MAAM,EAAEjD,SAAS,CAAC0E,iBAAiB,CAAC/D,MAAM,CAACsC,MAAM;IACjDnC,MAAM,EAAEd,SAAS,CAAC0E,iBAAiB,CAAC/D,MAAM,CAACG;GAC5C;CACF,CAAC","ignoreList":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* @since
|
|
5
|
+
* @since 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export * as Generated from "./Generated.ts";
|
|
8
8
|
/**
|
|
9
|
-
* OpenAI Client module for interacting with OpenAI's API.
|
|
10
|
-
*
|
|
11
|
-
* Provides a type-safe, Effect-based client for OpenAI operations including
|
|
12
|
-
* completions, embeddings, and streaming responses.
|
|
13
|
-
*
|
|
14
9
|
* @since 4.0.0
|
|
15
10
|
*/
|
|
16
11
|
export * as OpenAiClient from "./OpenAiClient.ts";
|
|
@@ -19,73 +14,30 @@ export * as OpenAiClient from "./OpenAiClient.ts";
|
|
|
19
14
|
*/
|
|
20
15
|
export * as OpenAiClientGenerated from "./OpenAiClientGenerated.ts";
|
|
21
16
|
/**
|
|
22
|
-
* The `OpenAiConfig` module provides contextual configuration for the
|
|
23
|
-
* `@effect/ai-openai` integration. It is used to customize how OpenAI clients
|
|
24
|
-
* are built and interpreted without threading configuration through every API
|
|
25
|
-
* call manually.
|
|
26
|
-
*
|
|
27
|
-
* The primary use case is installing an HTTP client transform with
|
|
28
|
-
* {@link withClientTransform}. This lets applications adapt the underlying
|
|
29
|
-
* OpenAI HTTP client for cross-cutting concerns such as custom middleware,
|
|
30
|
-
* instrumentation, proxying, or request policy changes while keeping the
|
|
31
|
-
* OpenAI service APIs unchanged.
|
|
32
|
-
*
|
|
33
|
-
* Configuration is scoped through Effect's context, so transforms only apply to
|
|
34
|
-
* the effect they are provided to and anything evaluated inside that scope.
|
|
35
|
-
* When multiple transforms are needed, compose them into a single
|
|
36
|
-
* `HttpClient => HttpClient` function before providing the configuration.
|
|
37
|
-
*
|
|
38
17
|
* @since 4.0.0
|
|
39
18
|
*/
|
|
40
19
|
export * as OpenAiConfig from "./OpenAiConfig.ts";
|
|
41
20
|
/**
|
|
42
|
-
* OpenAI Embedding Model implementation.
|
|
43
|
-
*
|
|
44
|
-
* Provides an EmbeddingModel implementation for OpenAI's embeddings API.
|
|
45
|
-
*
|
|
46
21
|
* @since 4.0.0
|
|
47
22
|
*/
|
|
48
23
|
export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.ts";
|
|
49
24
|
/**
|
|
50
|
-
* OpenAI error metadata augmentation.
|
|
51
|
-
*
|
|
52
|
-
* Provides OpenAI-specific metadata fields for AI error types through module
|
|
53
|
-
* augmentation, enabling typed access to OpenAI error details.
|
|
54
|
-
*
|
|
55
25
|
* @since 4.0.0
|
|
56
26
|
*/
|
|
57
27
|
export * as OpenAiError from "./OpenAiError.ts";
|
|
58
28
|
/**
|
|
59
|
-
* OpenAI Language Model implementation.
|
|
60
|
-
*
|
|
61
|
-
* Provides a LanguageModel implementation for OpenAI's responses API,
|
|
62
|
-
* supporting text generation, structured output, tool calling, and streaming.
|
|
63
|
-
*
|
|
64
29
|
* @since 4.0.0
|
|
65
30
|
*/
|
|
66
31
|
export * as OpenAiLanguageModel from "./OpenAiLanguageModel.ts";
|
|
67
32
|
/**
|
|
68
|
-
* Minimal local OpenAI schemas used by the handwritten Responses client path.
|
|
69
|
-
*
|
|
70
33
|
* @since 4.0.0
|
|
71
34
|
*/
|
|
72
35
|
export * as OpenAiSchema from "./OpenAiSchema.ts";
|
|
73
36
|
/**
|
|
74
|
-
* OpenAI telemetry attributes for OpenTelemetry integration.
|
|
75
|
-
*
|
|
76
|
-
* Provides OpenAI-specific GenAI telemetry attributes following OpenTelemetry
|
|
77
|
-
* semantic conventions, extending the base GenAI attributes with OpenAI-specific
|
|
78
|
-
* request and response metadata.
|
|
79
|
-
*
|
|
80
37
|
* @since 4.0.0
|
|
81
38
|
*/
|
|
82
39
|
export * as OpenAiTelemetry from "./OpenAiTelemetry.ts";
|
|
83
40
|
/**
|
|
84
|
-
* OpenAI provider-defined tools for use with the LanguageModel.
|
|
85
|
-
*
|
|
86
|
-
* Provides tools that are natively supported by OpenAI's API, including
|
|
87
|
-
* code interpreter, file search, and web search functionality.
|
|
88
|
-
*
|
|
89
41
|
* @since 4.0.0
|
|
90
42
|
*/
|
|
91
43
|
export * as OpenAiTool from "./OpenAiTool.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA;AAEnE;;GAEG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AAEjE;;GAEG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C;;GAEG;AACH,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAA;AAE/D;;GAEG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AAEvD;;GAEG;AACH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA"}
|