@langchain/openai 1.6.1 → 1.6.3
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/CHANGELOG.md +18 -0
- package/dist/azure/chat_models/common.d.cts +1 -2
- package/dist/azure/chat_models/common.d.cts.map +1 -1
- package/dist/azure/chat_models/common.d.ts +1 -2
- package/dist/azure/chat_models/common.d.ts.map +1 -1
- package/dist/azure/chat_models/completions.d.cts +1 -2
- package/dist/azure/chat_models/completions.d.cts.map +1 -1
- package/dist/azure/chat_models/completions.d.ts +1 -2
- package/dist/azure/chat_models/completions.d.ts.map +1 -1
- package/dist/azure/chat_models/index.cjs +5 -0
- package/dist/azure/chat_models/index.cjs.map +1 -1
- package/dist/azure/chat_models/index.d.cts +3 -2
- package/dist/azure/chat_models/index.d.cts.map +1 -1
- package/dist/azure/chat_models/index.d.ts +3 -2
- package/dist/azure/chat_models/index.d.ts.map +1 -1
- package/dist/azure/chat_models/index.js +5 -0
- package/dist/azure/chat_models/index.js.map +1 -1
- package/dist/azure/chat_models/responses.cjs +5 -0
- package/dist/azure/chat_models/responses.cjs.map +1 -1
- package/dist/azure/chat_models/responses.d.cts +3 -2
- package/dist/azure/chat_models/responses.d.cts.map +1 -1
- package/dist/azure/chat_models/responses.d.ts +3 -2
- package/dist/azure/chat_models/responses.d.ts.map +1 -1
- package/dist/azure/chat_models/responses.js +5 -0
- package/dist/azure/chat_models/responses.js.map +1 -1
- package/dist/azure/embeddings.d.cts +1 -2
- package/dist/azure/embeddings.d.cts.map +1 -1
- package/dist/azure/embeddings.d.ts +1 -2
- package/dist/azure/embeddings.d.ts.map +1 -1
- package/dist/azure/llms.d.cts +1 -2
- package/dist/azure/llms.d.cts.map +1 -1
- package/dist/azure/llms.d.ts.map +1 -1
- package/dist/chat_models/base.cjs +1 -1
- package/dist/chat_models/base.d.cts +4 -4
- package/dist/chat_models/base.d.cts.map +1 -1
- package/dist/chat_models/base.d.ts +4 -4
- package/dist/chat_models/base.d.ts.map +1 -1
- package/dist/chat_models/base.js +1 -1
- package/dist/chat_models/completions.cjs +2 -2
- package/dist/chat_models/completions.cjs.map +1 -1
- package/dist/chat_models/completions.d.cts +2 -3
- package/dist/chat_models/completions.d.cts.map +1 -1
- package/dist/chat_models/completions.d.ts +2 -3
- package/dist/chat_models/completions.d.ts.map +1 -1
- package/dist/chat_models/completions.js +2 -2
- package/dist/chat_models/completions.js.map +1 -1
- package/dist/chat_models/index.cjs +2 -2
- package/dist/chat_models/index.cjs.map +1 -1
- package/dist/chat_models/index.d.cts +4 -4
- package/dist/chat_models/index.d.cts.map +1 -1
- package/dist/chat_models/index.d.ts +4 -4
- package/dist/chat_models/index.d.ts.map +1 -1
- package/dist/chat_models/index.js +2 -2
- package/dist/chat_models/index.js.map +1 -1
- package/dist/chat_models/profiles.cjs +350 -193
- package/dist/chat_models/profiles.cjs.map +1 -1
- package/dist/chat_models/profiles.js +350 -193
- package/dist/chat_models/profiles.js.map +1 -1
- package/dist/chat_models/responses.cjs +2 -2
- package/dist/chat_models/responses.cjs.map +1 -1
- package/dist/chat_models/responses.d.cts +3 -4
- package/dist/chat_models/responses.d.cts.map +1 -1
- package/dist/chat_models/responses.d.ts +3 -4
- package/dist/chat_models/responses.d.ts.map +1 -1
- package/dist/chat_models/responses.js +2 -2
- package/dist/chat_models/responses.js.map +1 -1
- package/dist/converters/completions.cjs +4 -1
- package/dist/converters/completions.cjs.map +1 -1
- package/dist/converters/completions.d.cts +6 -7
- package/dist/converters/completions.d.cts.map +1 -1
- package/dist/converters/completions.d.ts +6 -7
- package/dist/converters/completions.d.ts.map +1 -1
- package/dist/converters/completions.js +5 -2
- package/dist/converters/completions.js.map +1 -1
- package/dist/converters/responses.cjs +41 -11
- package/dist/converters/responses.cjs.map +1 -1
- package/dist/converters/responses.d.cts +11 -12
- package/dist/converters/responses.d.cts.map +1 -1
- package/dist/converters/responses.d.ts +11 -12
- package/dist/converters/responses.d.ts.map +1 -1
- package/dist/converters/responses.js +42 -12
- package/dist/converters/responses.js.map +1 -1
- package/dist/embeddings.d.cts +3 -4
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +3 -4
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/llms.cjs +1 -1
- package/dist/llms.d.cts.map +1 -1
- package/dist/llms.d.ts.map +1 -1
- package/dist/llms.js +1 -1
- package/dist/tools/applyPatch.d.cts +8 -9
- package/dist/tools/applyPatch.d.cts.map +1 -1
- package/dist/tools/applyPatch.d.ts +8 -9
- package/dist/tools/applyPatch.d.ts.map +1 -1
- package/dist/tools/codeInterpreter.d.cts +5 -6
- package/dist/tools/codeInterpreter.d.cts.map +1 -1
- package/dist/tools/codeInterpreter.d.ts +5 -6
- package/dist/tools/codeInterpreter.d.ts.map +1 -1
- package/dist/tools/computerUse.d.cts +17 -18
- package/dist/tools/computerUse.d.cts.map +1 -1
- package/dist/tools/computerUse.d.ts +17 -18
- package/dist/tools/computerUse.d.ts.map +1 -1
- package/dist/tools/custom.d.cts +2 -3
- package/dist/tools/custom.d.cts.map +1 -1
- package/dist/tools/custom.d.ts +2 -3
- package/dist/tools/custom.d.ts.map +1 -1
- package/dist/tools/dalle.d.cts +3 -4
- package/dist/tools/dalle.d.cts.map +1 -1
- package/dist/tools/dalle.d.ts +3 -4
- package/dist/tools/dalle.d.ts.map +1 -1
- package/dist/tools/fileSearch.d.cts +9 -10
- package/dist/tools/fileSearch.d.cts.map +1 -1
- package/dist/tools/fileSearch.d.ts +9 -10
- package/dist/tools/fileSearch.d.ts.map +1 -1
- package/dist/tools/imageGeneration.d.cts +4 -5
- package/dist/tools/imageGeneration.d.cts.map +1 -1
- package/dist/tools/imageGeneration.d.ts +4 -5
- package/dist/tools/imageGeneration.d.ts.map +1 -1
- package/dist/tools/index.d.cts +2 -2
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/localShell.d.cts +5 -6
- package/dist/tools/localShell.d.cts.map +1 -1
- package/dist/tools/localShell.d.ts +5 -6
- package/dist/tools/localShell.d.ts.map +1 -1
- package/dist/tools/mcp.d.cts +8 -9
- package/dist/tools/mcp.d.cts.map +1 -1
- package/dist/tools/mcp.d.ts +8 -9
- package/dist/tools/mcp.d.ts.map +1 -1
- package/dist/tools/shell.d.cts +8 -9
- package/dist/tools/shell.d.cts.map +1 -1
- package/dist/tools/shell.d.ts +8 -9
- package/dist/tools/shell.d.ts.map +1 -1
- package/dist/tools/toolSearch.d.cts +3 -4
- package/dist/tools/toolSearch.d.cts.map +1 -1
- package/dist/tools/toolSearch.d.ts +3 -4
- package/dist/tools/toolSearch.d.ts.map +1 -1
- package/dist/tools/webSearch.d.cts +5 -6
- package/dist/tools/webSearch.d.cts.map +1 -1
- package/dist/tools/webSearch.d.ts +5 -6
- package/dist/tools/webSearch.d.ts.map +1 -1
- package/dist/types.d.cts +16 -16
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.ts +16 -16
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/azure.d.cts +7 -8
- package/dist/utils/azure.d.cts.map +1 -1
- package/dist/utils/azure.d.ts +7 -8
- package/dist/utils/azure.d.ts.map +1 -1
- package/dist/utils/client.d.cts +1 -2
- package/dist/utils/client.d.cts.map +1 -1
- package/dist/utils/client.d.ts +1 -2
- package/dist/utils/client.d.ts.map +1 -1
- package/dist/utils/misc.cjs +26 -0
- package/dist/utils/misc.cjs.map +1 -1
- package/dist/utils/misc.d.cts +1 -2
- package/dist/utils/misc.d.cts.map +1 -1
- package/dist/utils/misc.d.ts +1 -2
- package/dist/utils/misc.d.ts.map +1 -1
- package/dist/utils/misc.js +26 -2
- package/dist/utils/misc.js.map +1 -1
- package/dist/utils/profile.cjs +27 -0
- package/dist/utils/profile.cjs.map +1 -0
- package/dist/utils/profile.js +27 -0
- package/dist/utils/profile.js.map +1 -0
- package/dist/utils/prompts.d.cts +1 -2
- package/dist/utils/prompts.d.cts.map +1 -1
- package/dist/utils/prompts.d.ts +1 -2
- package/dist/utils/prompts.d.ts.map +1 -1
- package/dist/utils/responses_stream_events.d.cts +2 -3
- package/dist/utils/responses_stream_events.d.cts.map +1 -1
- package/dist/utils/responses_stream_events.d.ts +2 -3
- package/dist/utils/responses_stream_events.d.ts.map +1 -1
- package/dist/utils/tools.d.cts +4 -5
- package/dist/utils/tools.d.cts.map +1 -1
- package/dist/utils/tools.d.ts +4 -5
- package/dist/utils/tools.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/utils/file_mime_types.cjs +0 -15
- package/dist/utils/file_mime_types.cjs.map +0 -1
- package/dist/utils/file_mime_types.js +0 -15
- package/dist/utils/file_mime_types.js.map +0 -1
|
@@ -4,11 +4,11 @@ import { ServerTool } from "@langchain/core/tools";
|
|
|
4
4
|
/**
|
|
5
5
|
* Comparison operators for file attribute filtering.
|
|
6
6
|
*/
|
|
7
|
-
type FileSearchComparisonType = "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
7
|
+
export type FileSearchComparisonType = "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
8
8
|
/**
|
|
9
9
|
* A filter used to compare a specified attribute key to a given value.
|
|
10
10
|
*/
|
|
11
|
-
interface FileSearchComparisonFilter {
|
|
11
|
+
export interface FileSearchComparisonFilter {
|
|
12
12
|
/**
|
|
13
13
|
* The comparison operator to use.
|
|
14
14
|
* - `eq`: equals
|
|
@@ -32,7 +32,7 @@ interface FileSearchComparisonFilter {
|
|
|
32
32
|
/**
|
|
33
33
|
* Combine multiple filters using `and` or `or`.
|
|
34
34
|
*/
|
|
35
|
-
interface FileSearchCompoundFilter {
|
|
35
|
+
export interface FileSearchCompoundFilter {
|
|
36
36
|
/**
|
|
37
37
|
* Type of operation: `and` or `or`.
|
|
38
38
|
*/
|
|
@@ -45,11 +45,11 @@ interface FileSearchCompoundFilter {
|
|
|
45
45
|
/**
|
|
46
46
|
* Filter type for file search - can be a comparison or compound filter.
|
|
47
47
|
*/
|
|
48
|
-
type FileSearchFilter = FileSearchComparisonFilter | FileSearchCompoundFilter;
|
|
48
|
+
export type FileSearchFilter = FileSearchComparisonFilter | FileSearchCompoundFilter;
|
|
49
49
|
/**
|
|
50
50
|
* Weights for hybrid search balancing semantic and keyword matches.
|
|
51
51
|
*/
|
|
52
|
-
interface FileSearchHybridSearchWeights {
|
|
52
|
+
export interface FileSearchHybridSearchWeights {
|
|
53
53
|
/**
|
|
54
54
|
* The weight of semantic embedding matches (0-1).
|
|
55
55
|
*/
|
|
@@ -62,7 +62,7 @@ interface FileSearchHybridSearchWeights {
|
|
|
62
62
|
/**
|
|
63
63
|
* Ranking options for file search results.
|
|
64
64
|
*/
|
|
65
|
-
interface FileSearchRankingOptions {
|
|
65
|
+
export interface FileSearchRankingOptions {
|
|
66
66
|
/**
|
|
67
67
|
* The ranker to use for the file search.
|
|
68
68
|
* - `auto`: Automatically select the best ranker
|
|
@@ -83,7 +83,7 @@ interface FileSearchRankingOptions {
|
|
|
83
83
|
/**
|
|
84
84
|
* Options for the File Search tool.
|
|
85
85
|
*/
|
|
86
|
-
interface FileSearchOptions {
|
|
86
|
+
export interface FileSearchOptions {
|
|
87
87
|
/**
|
|
88
88
|
* The IDs of the vector stores to search.
|
|
89
89
|
* You must have previously created vector stores and uploaded files to them.
|
|
@@ -107,7 +107,7 @@ interface FileSearchOptions {
|
|
|
107
107
|
/**
|
|
108
108
|
* OpenAI File Search tool type for the Responses API.
|
|
109
109
|
*/
|
|
110
|
-
type FileSearchTool = OpenAI.Responses.FileSearchTool;
|
|
110
|
+
export type FileSearchTool = OpenAI.Responses.FileSearchTool;
|
|
111
111
|
/**
|
|
112
112
|
* Creates a File Search tool that allows models to search your files
|
|
113
113
|
* for relevant information using semantic and keyword search.
|
|
@@ -216,7 +216,6 @@ type FileSearchTool = OpenAI.Responses.FileSearchTool;
|
|
|
216
216
|
* - Use `include: ["file_search_call.results"]` in the API call to get search results
|
|
217
217
|
* - Supported file types include PDF, DOCX, TXT, MD, and many code file formats
|
|
218
218
|
*/
|
|
219
|
-
declare function fileSearch(options: FileSearchOptions): ServerTool;
|
|
219
|
+
export declare function fileSearch(options: FileSearchOptions): ServerTool;
|
|
220
220
|
//#endregion
|
|
221
|
-
export { FileSearchComparisonFilter, FileSearchComparisonType, FileSearchCompoundFilter, FileSearchFilter, FileSearchHybridSearchWeights, FileSearchOptions, FileSearchRankingOptions, FileSearchTool, fileSearch };
|
|
222
221
|
//# sourceMappingURL=fileSearch.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSearch.d.cts","names":[],"sources":["../../src/tools/fileSearch.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"fileSearch.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/fileSearch.ts"],"mappings":";;;;;;YAMY;;;;iBAWK;;;;;;;;;;EAUf,MAAM;;;;EAIN;;;;;EAKA,mCAAmC;;;;;iBAMpB;;;;EAIf;;;;EAIA,SAAS,MAAM,6BAA6B;;;;;YAMlC,mBACR,6BACA;;;;iBAKa;;;;EAIf;;;;EAIA;;;;;iBAMe;;;;;;EAMf;;;;;EAKA;;;;;EAKA,eAAe;;;;;iBAMA;;;;;EAKf;;;;;EAKA;;;;;EAKA,UAAU;;;;EAIV,iBAAiB;;;;;YAMP,iBAAiBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiIpC,WAAW,SAAS,oBAAoB"}
|
|
@@ -4,11 +4,11 @@ import { ServerTool } from "@langchain/core/tools";
|
|
|
4
4
|
/**
|
|
5
5
|
* Comparison operators for file attribute filtering.
|
|
6
6
|
*/
|
|
7
|
-
type FileSearchComparisonType = "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
7
|
+
export type FileSearchComparisonType = "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
8
8
|
/**
|
|
9
9
|
* A filter used to compare a specified attribute key to a given value.
|
|
10
10
|
*/
|
|
11
|
-
interface FileSearchComparisonFilter {
|
|
11
|
+
export interface FileSearchComparisonFilter {
|
|
12
12
|
/**
|
|
13
13
|
* The comparison operator to use.
|
|
14
14
|
* - `eq`: equals
|
|
@@ -32,7 +32,7 @@ interface FileSearchComparisonFilter {
|
|
|
32
32
|
/**
|
|
33
33
|
* Combine multiple filters using `and` or `or`.
|
|
34
34
|
*/
|
|
35
|
-
interface FileSearchCompoundFilter {
|
|
35
|
+
export interface FileSearchCompoundFilter {
|
|
36
36
|
/**
|
|
37
37
|
* Type of operation: `and` or `or`.
|
|
38
38
|
*/
|
|
@@ -45,11 +45,11 @@ interface FileSearchCompoundFilter {
|
|
|
45
45
|
/**
|
|
46
46
|
* Filter type for file search - can be a comparison or compound filter.
|
|
47
47
|
*/
|
|
48
|
-
type FileSearchFilter = FileSearchComparisonFilter | FileSearchCompoundFilter;
|
|
48
|
+
export type FileSearchFilter = FileSearchComparisonFilter | FileSearchCompoundFilter;
|
|
49
49
|
/**
|
|
50
50
|
* Weights for hybrid search balancing semantic and keyword matches.
|
|
51
51
|
*/
|
|
52
|
-
interface FileSearchHybridSearchWeights {
|
|
52
|
+
export interface FileSearchHybridSearchWeights {
|
|
53
53
|
/**
|
|
54
54
|
* The weight of semantic embedding matches (0-1).
|
|
55
55
|
*/
|
|
@@ -62,7 +62,7 @@ interface FileSearchHybridSearchWeights {
|
|
|
62
62
|
/**
|
|
63
63
|
* Ranking options for file search results.
|
|
64
64
|
*/
|
|
65
|
-
interface FileSearchRankingOptions {
|
|
65
|
+
export interface FileSearchRankingOptions {
|
|
66
66
|
/**
|
|
67
67
|
* The ranker to use for the file search.
|
|
68
68
|
* - `auto`: Automatically select the best ranker
|
|
@@ -83,7 +83,7 @@ interface FileSearchRankingOptions {
|
|
|
83
83
|
/**
|
|
84
84
|
* Options for the File Search tool.
|
|
85
85
|
*/
|
|
86
|
-
interface FileSearchOptions {
|
|
86
|
+
export interface FileSearchOptions {
|
|
87
87
|
/**
|
|
88
88
|
* The IDs of the vector stores to search.
|
|
89
89
|
* You must have previously created vector stores and uploaded files to them.
|
|
@@ -107,7 +107,7 @@ interface FileSearchOptions {
|
|
|
107
107
|
/**
|
|
108
108
|
* OpenAI File Search tool type for the Responses API.
|
|
109
109
|
*/
|
|
110
|
-
type FileSearchTool = OpenAI.Responses.FileSearchTool;
|
|
110
|
+
export type FileSearchTool = OpenAI.Responses.FileSearchTool;
|
|
111
111
|
/**
|
|
112
112
|
* Creates a File Search tool that allows models to search your files
|
|
113
113
|
* for relevant information using semantic and keyword search.
|
|
@@ -216,7 +216,6 @@ type FileSearchTool = OpenAI.Responses.FileSearchTool;
|
|
|
216
216
|
* - Use `include: ["file_search_call.results"]` in the API call to get search results
|
|
217
217
|
* - Supported file types include PDF, DOCX, TXT, MD, and many code file formats
|
|
218
218
|
*/
|
|
219
|
-
declare function fileSearch(options: FileSearchOptions): ServerTool;
|
|
219
|
+
export declare function fileSearch(options: FileSearchOptions): ServerTool;
|
|
220
220
|
//#endregion
|
|
221
|
-
export { FileSearchComparisonFilter, FileSearchComparisonType, FileSearchCompoundFilter, FileSearchFilter, FileSearchHybridSearchWeights, FileSearchOptions, FileSearchRankingOptions, FileSearchTool, fileSearch };
|
|
222
221
|
//# sourceMappingURL=fileSearch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSearch.d.ts","names":[],"sources":["../../src/tools/fileSearch.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"fileSearch.d.ts","names":["OpenAIClient"],"sources":["../../src/tools/fileSearch.ts"],"mappings":";;;;;;YAMY;;;;iBAWK;;;;;;;;;;EAUf,MAAM;;;;EAIN;;;;;EAKA,mCAAmC;;;;;iBAMpB;;;;EAIf;;;;EAIA,SAAS,MAAM,6BAA6B;;;;;YAMlC,mBACR,6BACA;;;;iBAKa;;;;EAIf;;;;EAIA;;;;;iBAMe;;;;;;EAMf;;;;;EAKA;;;;;EAKA,eAAe;;;;;iBAMA;;;;;EAKf;;;;;EAKA;;;;;EAKA,UAAU;;;;EAIV,iBAAiB;;;;;YAMP,iBAAiBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiIpC,WAAW,SAAS,oBAAoB"}
|
|
@@ -5,7 +5,7 @@ import { ServerTool } from "@langchain/core/tools";
|
|
|
5
5
|
* Optional mask for inpainting. Allows you to specify areas of the image
|
|
6
6
|
* that should be regenerated.
|
|
7
7
|
*/
|
|
8
|
-
interface ImageGenerationInputMask {
|
|
8
|
+
export interface ImageGenerationInputMask {
|
|
9
9
|
/**
|
|
10
10
|
* Base64-encoded mask image URL.
|
|
11
11
|
*/
|
|
@@ -18,7 +18,7 @@ interface ImageGenerationInputMask {
|
|
|
18
18
|
/**
|
|
19
19
|
* Options for the Image Generation tool.
|
|
20
20
|
*/
|
|
21
|
-
interface ImageGenerationOptions {
|
|
21
|
+
export interface ImageGenerationOptions {
|
|
22
22
|
/**
|
|
23
23
|
* Whether to generate a new image or edit an existing image.
|
|
24
24
|
* - `generate`: Generate a new image from scratch
|
|
@@ -101,7 +101,7 @@ interface ImageGenerationOptions {
|
|
|
101
101
|
/**
|
|
102
102
|
* OpenAI Image Generation tool type for the Responses API.
|
|
103
103
|
*/
|
|
104
|
-
type ImageGenerationTool = OpenAI.Responses.Tool.ImageGeneration;
|
|
104
|
+
export type ImageGenerationTool = OpenAI.Responses.Tool.ImageGeneration;
|
|
105
105
|
/**
|
|
106
106
|
* Creates an Image Generation tool that allows models to generate or edit images
|
|
107
107
|
* using text prompts and optional image inputs.
|
|
@@ -199,7 +199,6 @@ type ImageGenerationTool = OpenAI.Responses.Tool.ImageGeneration;
|
|
|
199
199
|
* - Access the revised prompt via `revised_prompt` field in the output
|
|
200
200
|
* - Multi-turn editing is supported by passing previous response messages
|
|
201
201
|
*/
|
|
202
|
-
declare function imageGeneration(options?: ImageGenerationOptions): ServerTool;
|
|
202
|
+
export declare function imageGeneration(options?: ImageGenerationOptions): ServerTool;
|
|
203
203
|
//#endregion
|
|
204
|
-
export { ImageGenerationInputMask, ImageGenerationOptions, ImageGenerationTool, imageGeneration };
|
|
205
204
|
//# sourceMappingURL=imageGeneration.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageGeneration.d.cts","names":[],"sources":["../../src/tools/imageGeneration.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"imageGeneration.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/imageGeneration.ts"],"mappings":";;;;;;;iBAOiB;;;;EAIf;;;;EAIA;;;;;iBAMe;;;;;;;;EAQf;;;;;;;;EASA;;;;;;;;;EAUA;;;;;EAMA,iBAAiB;;;;;EAMjB;;;;;;;EAQA;;;;;;EAOA;;;;;EAMA;;;;;;;EAQA;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;YAMU,sBAAsBA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgH9C,gBAAgB,UAAU,yBAAyB"}
|
|
@@ -5,7 +5,7 @@ import { ServerTool } from "@langchain/core/tools";
|
|
|
5
5
|
* Optional mask for inpainting. Allows you to specify areas of the image
|
|
6
6
|
* that should be regenerated.
|
|
7
7
|
*/
|
|
8
|
-
interface ImageGenerationInputMask {
|
|
8
|
+
export interface ImageGenerationInputMask {
|
|
9
9
|
/**
|
|
10
10
|
* Base64-encoded mask image URL.
|
|
11
11
|
*/
|
|
@@ -18,7 +18,7 @@ interface ImageGenerationInputMask {
|
|
|
18
18
|
/**
|
|
19
19
|
* Options for the Image Generation tool.
|
|
20
20
|
*/
|
|
21
|
-
interface ImageGenerationOptions {
|
|
21
|
+
export interface ImageGenerationOptions {
|
|
22
22
|
/**
|
|
23
23
|
* Whether to generate a new image or edit an existing image.
|
|
24
24
|
* - `generate`: Generate a new image from scratch
|
|
@@ -101,7 +101,7 @@ interface ImageGenerationOptions {
|
|
|
101
101
|
/**
|
|
102
102
|
* OpenAI Image Generation tool type for the Responses API.
|
|
103
103
|
*/
|
|
104
|
-
type ImageGenerationTool = OpenAI.Responses.Tool.ImageGeneration;
|
|
104
|
+
export type ImageGenerationTool = OpenAI.Responses.Tool.ImageGeneration;
|
|
105
105
|
/**
|
|
106
106
|
* Creates an Image Generation tool that allows models to generate or edit images
|
|
107
107
|
* using text prompts and optional image inputs.
|
|
@@ -199,7 +199,6 @@ type ImageGenerationTool = OpenAI.Responses.Tool.ImageGeneration;
|
|
|
199
199
|
* - Access the revised prompt via `revised_prompt` field in the output
|
|
200
200
|
* - Multi-turn editing is supported by passing previous response messages
|
|
201
201
|
*/
|
|
202
|
-
declare function imageGeneration(options?: ImageGenerationOptions): ServerTool;
|
|
202
|
+
export declare function imageGeneration(options?: ImageGenerationOptions): ServerTool;
|
|
203
203
|
//#endregion
|
|
204
|
-
export { ImageGenerationInputMask, ImageGenerationOptions, ImageGenerationTool, imageGeneration };
|
|
205
204
|
//# sourceMappingURL=imageGeneration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageGeneration.d.ts","names":[],"sources":["../../src/tools/imageGeneration.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"imageGeneration.d.ts","names":["OpenAIClient"],"sources":["../../src/tools/imageGeneration.ts"],"mappings":";;;;;;;iBAOiB;;;;EAIf;;;;EAIA;;;;;iBAMe;;;;;;;;EAQf;;;;;;;;EASA;;;;;;;;;EAUA;;;;;EAMA,iBAAiB;;;;;EAMjB;;;;;;;EAQA;;;;;;EAOA;;;;;EAMA;;;;;;;EAQA;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;YAMU,sBAAsBA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgH9C,gBAAgB,UAAU,yBAAyB"}
|
package/dist/tools/index.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ import { ShellAction, ShellCallOutcome, ShellCommandOutput, ShellOptions, ShellR
|
|
|
10
10
|
import { ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchOperation, ApplyPatchOptions, ApplyPatchTool, ApplyPatchUpdateFileOperation, applyPatch } from "./applyPatch.cjs";
|
|
11
11
|
import { ToolSearchOptions, ToolSearchTool, toolSearch } from "./toolSearch.cjs";
|
|
12
12
|
//#region src/tools/index.d.ts
|
|
13
|
-
declare const tools: {
|
|
13
|
+
export declare const tools: {
|
|
14
14
|
webSearch: typeof webSearch;
|
|
15
15
|
mcp: typeof mcp;
|
|
16
16
|
codeInterpreter: typeof codeInterpreter;
|
|
@@ -23,5 +23,5 @@ declare const tools: {
|
|
|
23
23
|
toolSearch: typeof toolSearch;
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
|
-
export { type ApplyPatchCreateFileOperation, type ApplyPatchDeleteFileOperation, type ApplyPatchOperation, type ApplyPatchOptions, type ApplyPatchTool, type ApplyPatchUpdateFileOperation, type CodeInterpreterAutoContainer, type CodeInterpreterMemoryLimit, type CodeInterpreterOptions, type CodeInterpreterTool, type ComputerUseAction, type ComputerUseClickAction, type ComputerUseDoubleClickAction, type ComputerUseDragAction, type ComputerUseEnvironment, type ComputerUseInput, type ComputerUseKeypressAction, type ComputerUseMoveAction, type ComputerUseOptions, type ComputerUseScreenshotAction, type ComputerUseScrollAction, type ComputerUseTool, type ComputerUseTypeAction, type ComputerUseWaitAction, DallEAPIWrapper, DallEAPIWrapperParams, type FileSearchComparisonFilter, type FileSearchComparisonType, type FileSearchCompoundFilter, type FileSearchFilter, type FileSearchHybridSearchWeights, type FileSearchOptions, type FileSearchRankingOptions, type FileSearchTool, type ImageGenerationInputMask, type ImageGenerationOptions, type ImageGenerationTool, type LocalShellAction, type LocalShellOptions, type LocalShellTool, type McpApprovalFilter, type McpConnectorId, type McpConnectorOptions, type McpRemoteServerOptions, type McpTool, type McpToolFilter, OpenAIImageModelId, type ShellAction, type ShellCallOutcome, type ShellCommandOutput, type ShellOptions, type ShellResult, type ShellTool, type ToolSearchOptions, type ToolSearchTool, type WebSearchFilters, type WebSearchOptions, type WebSearchTool
|
|
26
|
+
export { type ApplyPatchCreateFileOperation, type ApplyPatchDeleteFileOperation, type ApplyPatchOperation, type ApplyPatchOptions, type ApplyPatchTool, type ApplyPatchUpdateFileOperation, type CodeInterpreterAutoContainer, type CodeInterpreterMemoryLimit, type CodeInterpreterOptions, type CodeInterpreterTool, type ComputerUseAction, type ComputerUseClickAction, type ComputerUseDoubleClickAction, type ComputerUseDragAction, type ComputerUseEnvironment, type ComputerUseInput, type ComputerUseKeypressAction, type ComputerUseMoveAction, type ComputerUseOptions, type ComputerUseScreenshotAction, type ComputerUseScrollAction, type ComputerUseTool, type ComputerUseTypeAction, type ComputerUseWaitAction, DallEAPIWrapper, DallEAPIWrapperParams, type FileSearchComparisonFilter, type FileSearchComparisonType, type FileSearchCompoundFilter, type FileSearchFilter, type FileSearchHybridSearchWeights, type FileSearchOptions, type FileSearchRankingOptions, type FileSearchTool, type ImageGenerationInputMask, type ImageGenerationOptions, type ImageGenerationTool, type LocalShellAction, type LocalShellOptions, type LocalShellTool, type McpApprovalFilter, type McpConnectorId, type McpConnectorOptions, type McpRemoteServerOptions, type McpTool, type McpToolFilter, OpenAIImageModelId, type ShellAction, type ShellCallOutcome, type ShellCommandOutput, type ShellOptions, type ShellResult, type ShellTool, type ToolSearchOptions, type ToolSearchTool, type WebSearchFilters, type WebSearchOptions, type WebSearchTool };
|
|
27
27
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/tools/index.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/tools/index.ts"],"mappings":";;;;;;;;;;;;qBA8Fa"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ShellAction, ShellCallOutcome, ShellCommandOutput, ShellOptions, ShellR
|
|
|
10
10
|
import { ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchOperation, ApplyPatchOptions, ApplyPatchTool, ApplyPatchUpdateFileOperation, applyPatch } from "./applyPatch.js";
|
|
11
11
|
import { ToolSearchOptions, ToolSearchTool, toolSearch } from "./toolSearch.js";
|
|
12
12
|
//#region src/tools/index.d.ts
|
|
13
|
-
declare const tools: {
|
|
13
|
+
export declare const tools: {
|
|
14
14
|
webSearch: typeof webSearch;
|
|
15
15
|
mcp: typeof mcp;
|
|
16
16
|
codeInterpreter: typeof codeInterpreter;
|
|
@@ -23,5 +23,5 @@ declare const tools: {
|
|
|
23
23
|
toolSearch: typeof toolSearch;
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
|
-
export { type ApplyPatchCreateFileOperation, type ApplyPatchDeleteFileOperation, type ApplyPatchOperation, type ApplyPatchOptions, type ApplyPatchTool, type ApplyPatchUpdateFileOperation, type CodeInterpreterAutoContainer, type CodeInterpreterMemoryLimit, type CodeInterpreterOptions, type CodeInterpreterTool, type ComputerUseAction, type ComputerUseClickAction, type ComputerUseDoubleClickAction, type ComputerUseDragAction, type ComputerUseEnvironment, type ComputerUseInput, type ComputerUseKeypressAction, type ComputerUseMoveAction, type ComputerUseOptions, type ComputerUseScreenshotAction, type ComputerUseScrollAction, type ComputerUseTool, type ComputerUseTypeAction, type ComputerUseWaitAction, DallEAPIWrapper, DallEAPIWrapperParams, type FileSearchComparisonFilter, type FileSearchComparisonType, type FileSearchCompoundFilter, type FileSearchFilter, type FileSearchHybridSearchWeights, type FileSearchOptions, type FileSearchRankingOptions, type FileSearchTool, type ImageGenerationInputMask, type ImageGenerationOptions, type ImageGenerationTool, type LocalShellAction, type LocalShellOptions, type LocalShellTool, type McpApprovalFilter, type McpConnectorId, type McpConnectorOptions, type McpRemoteServerOptions, type McpTool, type McpToolFilter, OpenAIImageModelId, type ShellAction, type ShellCallOutcome, type ShellCommandOutput, type ShellOptions, type ShellResult, type ShellTool, type ToolSearchOptions, type ToolSearchTool, type WebSearchFilters, type WebSearchOptions, type WebSearchTool
|
|
26
|
+
export { type ApplyPatchCreateFileOperation, type ApplyPatchDeleteFileOperation, type ApplyPatchOperation, type ApplyPatchOptions, type ApplyPatchTool, type ApplyPatchUpdateFileOperation, type CodeInterpreterAutoContainer, type CodeInterpreterMemoryLimit, type CodeInterpreterOptions, type CodeInterpreterTool, type ComputerUseAction, type ComputerUseClickAction, type ComputerUseDoubleClickAction, type ComputerUseDragAction, type ComputerUseEnvironment, type ComputerUseInput, type ComputerUseKeypressAction, type ComputerUseMoveAction, type ComputerUseOptions, type ComputerUseScreenshotAction, type ComputerUseScrollAction, type ComputerUseTool, type ComputerUseTypeAction, type ComputerUseWaitAction, DallEAPIWrapper, DallEAPIWrapperParams, type FileSearchComparisonFilter, type FileSearchComparisonType, type FileSearchCompoundFilter, type FileSearchFilter, type FileSearchHybridSearchWeights, type FileSearchOptions, type FileSearchRankingOptions, type FileSearchTool, type ImageGenerationInputMask, type ImageGenerationOptions, type ImageGenerationTool, type LocalShellAction, type LocalShellOptions, type LocalShellTool, type McpApprovalFilter, type McpConnectorId, type McpConnectorOptions, type McpRemoteServerOptions, type McpTool, type McpToolFilter, OpenAIImageModelId, type ShellAction, type ShellCallOutcome, type ShellCommandOutput, type ShellOptions, type ShellResult, type ShellTool, type ToolSearchOptions, type ToolSearchTool, type WebSearchFilters, type WebSearchOptions, type WebSearchTool };
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/tools/index.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/tools/index.ts"],"mappings":";;;;;;;;;;;;qBA8Fa"}
|
|
@@ -7,8 +7,8 @@ import { z } from "zod/v4";
|
|
|
7
7
|
* The action contains command details like argv tokens, environment variables,
|
|
8
8
|
* working directory, timeout, and user.
|
|
9
9
|
*/
|
|
10
|
-
type LocalShellAction = OpenAI.Responses.ResponseOutputItem.LocalShellCall.Action;
|
|
11
|
-
declare const LocalShellActionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
10
|
+
export type LocalShellAction = OpenAI.Responses.ResponseOutputItem.LocalShellCall.Action;
|
|
11
|
+
export declare const LocalShellActionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
12
|
type: z.ZodLiteral<"exec">;
|
|
13
13
|
command: z.ZodArray<z.ZodString>;
|
|
14
14
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -19,7 +19,7 @@ declare const LocalShellActionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
19
19
|
/**
|
|
20
20
|
* Options for the Local Shell tool.
|
|
21
21
|
*/
|
|
22
|
-
interface LocalShellOptions {
|
|
22
|
+
export interface LocalShellOptions {
|
|
23
23
|
/**
|
|
24
24
|
* Optional execute function that handles shell command execution.
|
|
25
25
|
* This function receives the action input and should return the command output
|
|
@@ -45,7 +45,7 @@ interface LocalShellOptions {
|
|
|
45
45
|
/**
|
|
46
46
|
* OpenAI Local Shell tool type for the Responses API.
|
|
47
47
|
*/
|
|
48
|
-
type LocalShellTool = OpenAI.Responses.Tool.LocalShell;
|
|
48
|
+
export type LocalShellTool = OpenAI.Responses.Tool.LocalShell;
|
|
49
49
|
/**
|
|
50
50
|
* Creates a Local Shell tool that allows models to run shell commands locally
|
|
51
51
|
* on a machine you provide. Commands are executed inside your own runtime—
|
|
@@ -160,7 +160,6 @@ type LocalShellTool = OpenAI.Responses.Tool.LocalShell;
|
|
|
160
160
|
* - Always sandbox or validate commands before execution
|
|
161
161
|
* - The `timeout_ms` from the model is only a hint—enforce your own limits
|
|
162
162
|
*/
|
|
163
|
-
declare function localShell(options: LocalShellOptions): DynamicStructuredTool<typeof LocalShellActionSchema, LocalShellAction, unknown, string>;
|
|
163
|
+
export declare function localShell(options: LocalShellOptions): DynamicStructuredTool<typeof LocalShellActionSchema, LocalShellAction, unknown, string>;
|
|
164
164
|
//#endregion
|
|
165
|
-
export { LocalShellAction, LocalShellActionSchema, LocalShellOptions, LocalShellTool, localShell };
|
|
166
165
|
//# sourceMappingURL=localShell.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localShell.d.cts","names":[],"sources":["../../src/tools/localShell.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"localShell.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/localShell.ts"],"mappings":";;;;;;;;;YASY,mBACVA,OAAa,UAAU,mBAAmB,eAAe;qBAa9C,wBAAsB,EAAA,mBAAA,EAAA;;;;;;;GAAwC,EAAA,KAAA;;;;iBAK1D;;;;;;;;;;;;;;;;;;;;;EAqBf,UAAU,QAAQ,8BAA8B;;;;;YAMtC,iBAAiBA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsHzC,WAAW,SAAS,oBAed,6BACX,wBACP"}
|
|
@@ -7,8 +7,8 @@ import { z } from "zod/v4";
|
|
|
7
7
|
* The action contains command details like argv tokens, environment variables,
|
|
8
8
|
* working directory, timeout, and user.
|
|
9
9
|
*/
|
|
10
|
-
type LocalShellAction = OpenAI.Responses.ResponseOutputItem.LocalShellCall.Action;
|
|
11
|
-
declare const LocalShellActionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
10
|
+
export type LocalShellAction = OpenAI.Responses.ResponseOutputItem.LocalShellCall.Action;
|
|
11
|
+
export declare const LocalShellActionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
12
|
type: z.ZodLiteral<"exec">;
|
|
13
13
|
command: z.ZodArray<z.ZodString>;
|
|
14
14
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -19,7 +19,7 @@ declare const LocalShellActionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
19
19
|
/**
|
|
20
20
|
* Options for the Local Shell tool.
|
|
21
21
|
*/
|
|
22
|
-
interface LocalShellOptions {
|
|
22
|
+
export interface LocalShellOptions {
|
|
23
23
|
/**
|
|
24
24
|
* Optional execute function that handles shell command execution.
|
|
25
25
|
* This function receives the action input and should return the command output
|
|
@@ -45,7 +45,7 @@ interface LocalShellOptions {
|
|
|
45
45
|
/**
|
|
46
46
|
* OpenAI Local Shell tool type for the Responses API.
|
|
47
47
|
*/
|
|
48
|
-
type LocalShellTool = OpenAI.Responses.Tool.LocalShell;
|
|
48
|
+
export type LocalShellTool = OpenAI.Responses.Tool.LocalShell;
|
|
49
49
|
/**
|
|
50
50
|
* Creates a Local Shell tool that allows models to run shell commands locally
|
|
51
51
|
* on a machine you provide. Commands are executed inside your own runtime—
|
|
@@ -160,7 +160,6 @@ type LocalShellTool = OpenAI.Responses.Tool.LocalShell;
|
|
|
160
160
|
* - Always sandbox or validate commands before execution
|
|
161
161
|
* - The `timeout_ms` from the model is only a hint—enforce your own limits
|
|
162
162
|
*/
|
|
163
|
-
declare function localShell(options: LocalShellOptions): DynamicStructuredTool<typeof LocalShellActionSchema, LocalShellAction, unknown, string>;
|
|
163
|
+
export declare function localShell(options: LocalShellOptions): DynamicStructuredTool<typeof LocalShellActionSchema, LocalShellAction, unknown, string>;
|
|
164
164
|
//#endregion
|
|
165
|
-
export { LocalShellAction, LocalShellActionSchema, LocalShellOptions, LocalShellTool, localShell };
|
|
166
165
|
//# sourceMappingURL=localShell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localShell.d.ts","names":[],"sources":["../../src/tools/localShell.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"localShell.d.ts","names":["OpenAIClient"],"sources":["../../src/tools/localShell.ts"],"mappings":";;;;;;;;;YASY,mBACVA,OAAa,UAAU,mBAAmB,eAAe;qBAa9C,wBAAsB,EAAA,mBAAA,EAAA;;;;;;;GAAwC,EAAA,KAAA;;;;iBAK1D;;;;;;;;;;;;;;;;;;;;;EAqBf,UAAU,QAAQ,8BAA8B;;;;;YAMtC,iBAAiBA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsHzC,WAAW,SAAS,oBAed,6BACX,wBACP"}
|
package/dist/tools/mcp.d.cts
CHANGED
|
@@ -5,11 +5,11 @@ import { ServerTool } from "@langchain/core/tools";
|
|
|
5
5
|
* Available connector IDs for OpenAI's built-in service connectors.
|
|
6
6
|
* These are OpenAI-maintained MCP wrappers for popular services.
|
|
7
7
|
*/
|
|
8
|
-
type McpConnectorId = "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
|
|
8
|
+
export type McpConnectorId = "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
|
|
9
9
|
/**
|
|
10
10
|
* Filter object to specify which tools are allowed.
|
|
11
11
|
*/
|
|
12
|
-
interface McpToolFilter {
|
|
12
|
+
export interface McpToolFilter {
|
|
13
13
|
/**
|
|
14
14
|
* List of allowed tool names.
|
|
15
15
|
*/
|
|
@@ -23,7 +23,7 @@ interface McpToolFilter {
|
|
|
23
23
|
/**
|
|
24
24
|
* Filter object for approval requirements.
|
|
25
25
|
*/
|
|
26
|
-
interface McpApprovalFilter {
|
|
26
|
+
export interface McpApprovalFilter {
|
|
27
27
|
/**
|
|
28
28
|
* Tools that always require approval before execution.
|
|
29
29
|
*/
|
|
@@ -73,7 +73,7 @@ interface McpBaseOptions {
|
|
|
73
73
|
/**
|
|
74
74
|
* Options for connecting to a remote MCP server via URL.
|
|
75
75
|
*/
|
|
76
|
-
interface McpRemoteServerOptions extends McpBaseOptions {
|
|
76
|
+
export interface McpRemoteServerOptions extends McpBaseOptions {
|
|
77
77
|
/**
|
|
78
78
|
* The URL for the MCP server.
|
|
79
79
|
* The server must implement the Streamable HTTP or HTTP/SSE transport protocol.
|
|
@@ -83,7 +83,7 @@ interface McpRemoteServerOptions extends McpBaseOptions {
|
|
|
83
83
|
/**
|
|
84
84
|
* Options for connecting to an OpenAI-maintained service connector.
|
|
85
85
|
*/
|
|
86
|
-
interface McpConnectorOptions extends McpBaseOptions {
|
|
86
|
+
export interface McpConnectorOptions extends McpBaseOptions {
|
|
87
87
|
/**
|
|
88
88
|
* Identifier for the service connector.
|
|
89
89
|
* These are OpenAI-maintained MCP wrappers for popular services.
|
|
@@ -103,7 +103,7 @@ interface McpConnectorOptions extends McpBaseOptions {
|
|
|
103
103
|
/**
|
|
104
104
|
* OpenAI MCP tool type for the Responses API.
|
|
105
105
|
*/
|
|
106
|
-
type McpTool = OpenAI.Responses.Tool.Mcp;
|
|
106
|
+
export type McpTool = OpenAI.Responses.Tool.Mcp;
|
|
107
107
|
/**
|
|
108
108
|
* Creates an MCP tool that connects to a remote MCP server or OpenAI service connector.
|
|
109
109
|
* This allows OpenAI models to access external tools and services via the Model Context Protocol.
|
|
@@ -168,8 +168,7 @@ type McpTool = OpenAI.Responses.Tool.Mcp;
|
|
|
168
168
|
* });
|
|
169
169
|
* ```
|
|
170
170
|
*/
|
|
171
|
-
declare function mcp(options: McpRemoteServerOptions): ServerTool;
|
|
172
|
-
declare function mcp(options: McpConnectorOptions): ServerTool;
|
|
171
|
+
export declare function mcp(options: McpRemoteServerOptions): ServerTool;
|
|
172
|
+
export declare function mcp(options: McpConnectorOptions): ServerTool;
|
|
173
173
|
//#endregion
|
|
174
|
-
export { McpApprovalFilter, McpConnectorId, McpConnectorOptions, McpRemoteServerOptions, McpTool, McpToolFilter, mcp };
|
|
175
174
|
//# sourceMappingURL=mcp.d.cts.map
|
package/dist/tools/mcp.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.cts","names":[],"sources":["../../src/tools/mcp.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"mcp.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/mcp.ts"],"mappings":";;;;;;;YAOY;;;;iBAaK;;;;EAIf;;;;;EAKA;;;;;iBAMe;;;;EAIf,SAAS;;;;EAIT,QAAQ;;;;;UAMA;;;;EAIR;;;;;EAKA,0BAA0B;;;;;EAK1B;;;;;EAKA,UAAU;;;;;;;;;EASV,uCAAuC;;;;EAIvC;;;;;iBAMe,+BAA+B;;;;;EAK9C;;;;;iBAMe,4BAA4B;;;;;;;;;;;;;;;EAe3C,aAAa;;;;;YAMH,UAAUA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+GlC,IAAI,SAAS,yBAAyB;wBACtC,IAAI,SAAS,sBAAsB"}
|
package/dist/tools/mcp.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import { ServerTool } from "@langchain/core/tools";
|
|
|
5
5
|
* Available connector IDs for OpenAI's built-in service connectors.
|
|
6
6
|
* These are OpenAI-maintained MCP wrappers for popular services.
|
|
7
7
|
*/
|
|
8
|
-
type McpConnectorId = "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
|
|
8
|
+
export type McpConnectorId = "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
|
|
9
9
|
/**
|
|
10
10
|
* Filter object to specify which tools are allowed.
|
|
11
11
|
*/
|
|
12
|
-
interface McpToolFilter {
|
|
12
|
+
export interface McpToolFilter {
|
|
13
13
|
/**
|
|
14
14
|
* List of allowed tool names.
|
|
15
15
|
*/
|
|
@@ -23,7 +23,7 @@ interface McpToolFilter {
|
|
|
23
23
|
/**
|
|
24
24
|
* Filter object for approval requirements.
|
|
25
25
|
*/
|
|
26
|
-
interface McpApprovalFilter {
|
|
26
|
+
export interface McpApprovalFilter {
|
|
27
27
|
/**
|
|
28
28
|
* Tools that always require approval before execution.
|
|
29
29
|
*/
|
|
@@ -73,7 +73,7 @@ interface McpBaseOptions {
|
|
|
73
73
|
/**
|
|
74
74
|
* Options for connecting to a remote MCP server via URL.
|
|
75
75
|
*/
|
|
76
|
-
interface McpRemoteServerOptions extends McpBaseOptions {
|
|
76
|
+
export interface McpRemoteServerOptions extends McpBaseOptions {
|
|
77
77
|
/**
|
|
78
78
|
* The URL for the MCP server.
|
|
79
79
|
* The server must implement the Streamable HTTP or HTTP/SSE transport protocol.
|
|
@@ -83,7 +83,7 @@ interface McpRemoteServerOptions extends McpBaseOptions {
|
|
|
83
83
|
/**
|
|
84
84
|
* Options for connecting to an OpenAI-maintained service connector.
|
|
85
85
|
*/
|
|
86
|
-
interface McpConnectorOptions extends McpBaseOptions {
|
|
86
|
+
export interface McpConnectorOptions extends McpBaseOptions {
|
|
87
87
|
/**
|
|
88
88
|
* Identifier for the service connector.
|
|
89
89
|
* These are OpenAI-maintained MCP wrappers for popular services.
|
|
@@ -103,7 +103,7 @@ interface McpConnectorOptions extends McpBaseOptions {
|
|
|
103
103
|
/**
|
|
104
104
|
* OpenAI MCP tool type for the Responses API.
|
|
105
105
|
*/
|
|
106
|
-
type McpTool = OpenAI.Responses.Tool.Mcp;
|
|
106
|
+
export type McpTool = OpenAI.Responses.Tool.Mcp;
|
|
107
107
|
/**
|
|
108
108
|
* Creates an MCP tool that connects to a remote MCP server or OpenAI service connector.
|
|
109
109
|
* This allows OpenAI models to access external tools and services via the Model Context Protocol.
|
|
@@ -168,8 +168,7 @@ type McpTool = OpenAI.Responses.Tool.Mcp;
|
|
|
168
168
|
* });
|
|
169
169
|
* ```
|
|
170
170
|
*/
|
|
171
|
-
declare function mcp(options: McpRemoteServerOptions): ServerTool;
|
|
172
|
-
declare function mcp(options: McpConnectorOptions): ServerTool;
|
|
171
|
+
export declare function mcp(options: McpRemoteServerOptions): ServerTool;
|
|
172
|
+
export declare function mcp(options: McpConnectorOptions): ServerTool;
|
|
173
173
|
//#endregion
|
|
174
|
-
export { McpApprovalFilter, McpConnectorId, McpConnectorOptions, McpRemoteServerOptions, McpTool, McpToolFilter, mcp };
|
|
175
174
|
//# sourceMappingURL=mcp.d.ts.map
|
package/dist/tools/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","names":[],"sources":["../../src/tools/mcp.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","names":["OpenAIClient"],"sources":["../../src/tools/mcp.ts"],"mappings":";;;;;;;YAOY;;;;iBAaK;;;;EAIf;;;;;EAKA;;;;;iBAMe;;;;EAIf,SAAS;;;;EAIT,QAAQ;;;;;UAMA;;;;EAIR;;;;;EAKA,0BAA0B;;;;;EAK1B;;;;;EAKA,UAAU;;;;;;;;;EASV,uCAAuC;;;;EAIvC;;;;;iBAMe,+BAA+B;;;;;EAK9C;;;;;iBAMe,4BAA4B;;;;;;;;;;;;;;;EAe3C,aAAa;;;;;YAMH,UAAUA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+GlC,IAAI,SAAS,yBAAyB;wBACtC,IAAI,SAAS,sBAAsB"}
|
package/dist/tools/shell.d.cts
CHANGED
|
@@ -6,8 +6,8 @@ import { z } from "zod/v4";
|
|
|
6
6
|
* Re-export action type from OpenAI SDK for convenience.
|
|
7
7
|
* The action contains command details like commands array, timeout, and max output length.
|
|
8
8
|
*/
|
|
9
|
-
type ShellAction = OpenAI.Responses.ResponseFunctionShellToolCall.Action;
|
|
10
|
-
declare const ShellActionSchema: z.ZodObject<{
|
|
9
|
+
export type ShellAction = OpenAI.Responses.ResponseFunctionShellToolCall.Action;
|
|
10
|
+
export declare const ShellActionSchema: z.ZodObject<{
|
|
11
11
|
commands: z.ZodArray<z.ZodString>;
|
|
12
12
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
max_output_length: z.ZodOptional<z.ZodNumber>;
|
|
@@ -16,16 +16,16 @@ declare const ShellActionSchema: z.ZodObject<{
|
|
|
16
16
|
* Result of a single shell command execution.
|
|
17
17
|
* Contains stdout, stderr, and the outcome (exit code or timeout).
|
|
18
18
|
*/
|
|
19
|
-
type ShellCommandOutput = OpenAI.Responses.ResponseFunctionShellCallOutputContent;
|
|
19
|
+
export type ShellCommandOutput = OpenAI.Responses.ResponseFunctionShellCallOutputContent;
|
|
20
20
|
/**
|
|
21
21
|
* Outcome type for shell command execution - either exit with code or timeout.
|
|
22
22
|
*/
|
|
23
|
-
type ShellCallOutcome = ShellCommandOutput["outcome"];
|
|
23
|
+
export type ShellCallOutcome = ShellCommandOutput["outcome"];
|
|
24
24
|
/**
|
|
25
25
|
* Result of executing shell commands.
|
|
26
26
|
* Contains an array of outputs (one per command) and the max_output_length parameter.
|
|
27
27
|
*/
|
|
28
|
-
interface ShellResult {
|
|
28
|
+
export interface ShellResult {
|
|
29
29
|
/**
|
|
30
30
|
* Array of command outputs. Each entry corresponds to a command from the action.
|
|
31
31
|
* The order should match the order of commands in the action.
|
|
@@ -40,7 +40,7 @@ interface ShellResult {
|
|
|
40
40
|
/**
|
|
41
41
|
* Options for the Shell tool.
|
|
42
42
|
*/
|
|
43
|
-
interface ShellOptions {
|
|
43
|
+
export interface ShellOptions {
|
|
44
44
|
/**
|
|
45
45
|
* Execute function that handles shell command execution.
|
|
46
46
|
* This function receives the action input containing the commands and limits,
|
|
@@ -84,7 +84,7 @@ interface ShellOptions {
|
|
|
84
84
|
/**
|
|
85
85
|
* OpenAI Shell tool type for the Responses API.
|
|
86
86
|
*/
|
|
87
|
-
type ShellTool = OpenAI.Responses.FunctionShellTool;
|
|
87
|
+
export type ShellTool = OpenAI.Responses.FunctionShellTool;
|
|
88
88
|
/**
|
|
89
89
|
* Creates a Shell tool that allows models to run shell commands through your integration.
|
|
90
90
|
*
|
|
@@ -214,7 +214,6 @@ type ShellTool = OpenAI.Responses.FunctionShellTool;
|
|
|
214
214
|
* - If `max_output_length` exists in the action, always pass it back in the output
|
|
215
215
|
* - Many CLI tools return non-zero exit codes for warnings; still capture stdout/stderr
|
|
216
216
|
*/
|
|
217
|
-
declare function shell(options: ShellOptions): DynamicStructuredTool<typeof ShellActionSchema, ShellAction, unknown, string>;
|
|
217
|
+
export declare function shell(options: ShellOptions): DynamicStructuredTool<typeof ShellActionSchema, ShellAction, unknown, string>;
|
|
218
218
|
//#endregion
|
|
219
|
-
export { ShellAction, ShellActionSchema, ShellCallOutcome, ShellCommandOutput, ShellOptions, ShellResult, ShellTool, shell };
|
|
220
219
|
//# sourceMappingURL=shell.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.cts","names":[],"sources":["../../src/tools/shell.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"shell.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/shell.ts"],"mappings":";;;;;;;;YAQY,cACVA,OAAa,UAAU,8BAA8B;qBAG1C,mBAAiB,EAAA;;;;GAY5B,EAAA,KAAA;;;;;YAMU,qBACVA,OAAa,UAAU;;;;YAKb,mBAAmB;;;;;iBAMd;;;;;EAKf,QAAQ;;;;;EAKR;;;;;iBAMe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCf,UAAU,QAAQ,gBAAgB,cAAc,QAAQ;;;;;YAM9C,YAAYA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqI/B,MAAM,SAAS,eAyBT,6BACX,mBACP"}
|
package/dist/tools/shell.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { z } from "zod/v4";
|
|
|
6
6
|
* Re-export action type from OpenAI SDK for convenience.
|
|
7
7
|
* The action contains command details like commands array, timeout, and max output length.
|
|
8
8
|
*/
|
|
9
|
-
type ShellAction = OpenAI.Responses.ResponseFunctionShellToolCall.Action;
|
|
10
|
-
declare const ShellActionSchema: z.ZodObject<{
|
|
9
|
+
export type ShellAction = OpenAI.Responses.ResponseFunctionShellToolCall.Action;
|
|
10
|
+
export declare const ShellActionSchema: z.ZodObject<{
|
|
11
11
|
commands: z.ZodArray<z.ZodString>;
|
|
12
12
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
max_output_length: z.ZodOptional<z.ZodNumber>;
|
|
@@ -16,16 +16,16 @@ declare const ShellActionSchema: z.ZodObject<{
|
|
|
16
16
|
* Result of a single shell command execution.
|
|
17
17
|
* Contains stdout, stderr, and the outcome (exit code or timeout).
|
|
18
18
|
*/
|
|
19
|
-
type ShellCommandOutput = OpenAI.Responses.ResponseFunctionShellCallOutputContent;
|
|
19
|
+
export type ShellCommandOutput = OpenAI.Responses.ResponseFunctionShellCallOutputContent;
|
|
20
20
|
/**
|
|
21
21
|
* Outcome type for shell command execution - either exit with code or timeout.
|
|
22
22
|
*/
|
|
23
|
-
type ShellCallOutcome = ShellCommandOutput["outcome"];
|
|
23
|
+
export type ShellCallOutcome = ShellCommandOutput["outcome"];
|
|
24
24
|
/**
|
|
25
25
|
* Result of executing shell commands.
|
|
26
26
|
* Contains an array of outputs (one per command) and the max_output_length parameter.
|
|
27
27
|
*/
|
|
28
|
-
interface ShellResult {
|
|
28
|
+
export interface ShellResult {
|
|
29
29
|
/**
|
|
30
30
|
* Array of command outputs. Each entry corresponds to a command from the action.
|
|
31
31
|
* The order should match the order of commands in the action.
|
|
@@ -40,7 +40,7 @@ interface ShellResult {
|
|
|
40
40
|
/**
|
|
41
41
|
* Options for the Shell tool.
|
|
42
42
|
*/
|
|
43
|
-
interface ShellOptions {
|
|
43
|
+
export interface ShellOptions {
|
|
44
44
|
/**
|
|
45
45
|
* Execute function that handles shell command execution.
|
|
46
46
|
* This function receives the action input containing the commands and limits,
|
|
@@ -84,7 +84,7 @@ interface ShellOptions {
|
|
|
84
84
|
/**
|
|
85
85
|
* OpenAI Shell tool type for the Responses API.
|
|
86
86
|
*/
|
|
87
|
-
type ShellTool = OpenAI.Responses.FunctionShellTool;
|
|
87
|
+
export type ShellTool = OpenAI.Responses.FunctionShellTool;
|
|
88
88
|
/**
|
|
89
89
|
* Creates a Shell tool that allows models to run shell commands through your integration.
|
|
90
90
|
*
|
|
@@ -214,7 +214,6 @@ type ShellTool = OpenAI.Responses.FunctionShellTool;
|
|
|
214
214
|
* - If `max_output_length` exists in the action, always pass it back in the output
|
|
215
215
|
* - Many CLI tools return non-zero exit codes for warnings; still capture stdout/stderr
|
|
216
216
|
*/
|
|
217
|
-
declare function shell(options: ShellOptions): DynamicStructuredTool<typeof ShellActionSchema, ShellAction, unknown, string>;
|
|
217
|
+
export declare function shell(options: ShellOptions): DynamicStructuredTool<typeof ShellActionSchema, ShellAction, unknown, string>;
|
|
218
218
|
//#endregion
|
|
219
|
-
export { ShellAction, ShellActionSchema, ShellCallOutcome, ShellCommandOutput, ShellOptions, ShellResult, ShellTool, shell };
|
|
220
219
|
//# sourceMappingURL=shell.d.ts.map
|