@ai-sdk/openai 2.0.26 → 2.0.27
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 +6 -0
- package/dist/index.d.mts +67 -1
- package/dist/index.d.ts +67 -1
- package/dist/index.js +42 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -12
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +0 -12
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +0 -12
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -58,11 +58,56 @@ declare const factory: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
|
|
|
58
58
|
}>;
|
|
59
59
|
|
|
60
60
|
declare const openaiTools: {
|
|
61
|
+
/**
|
|
62
|
+
* The Code Interpreter tool allows models to write and run Python code in a
|
|
63
|
+
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
64
|
+
* coding, and math.
|
|
65
|
+
*
|
|
66
|
+
* @param container - The container to use for the code interpreter.
|
|
67
|
+
*
|
|
68
|
+
* Must have name `code_interpreter`.
|
|
69
|
+
*/
|
|
61
70
|
codeInterpreter: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
|
|
62
71
|
container?: string | {
|
|
63
|
-
fileIds
|
|
72
|
+
fileIds
|
|
73
|
+
/**
|
|
74
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
75
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
76
|
+
* semantic and keyword search.
|
|
77
|
+
*
|
|
78
|
+
* Must have name `file_search`.
|
|
79
|
+
*
|
|
80
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
81
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
82
|
+
* @param ranking - The ranking options to use for the file search.
|
|
83
|
+
* @param filters - The filters to use for the file search.
|
|
84
|
+
*/
|
|
85
|
+
? /**
|
|
86
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
87
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
88
|
+
* semantic and keyword search.
|
|
89
|
+
*
|
|
90
|
+
* Must have name `file_search`.
|
|
91
|
+
*
|
|
92
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
93
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
94
|
+
* @param ranking - The ranking options to use for the file search.
|
|
95
|
+
* @param filters - The filters to use for the file search.
|
|
96
|
+
*/: string[];
|
|
64
97
|
};
|
|
65
98
|
}>;
|
|
99
|
+
/**
|
|
100
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
101
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
102
|
+
* semantic and keyword search.
|
|
103
|
+
*
|
|
104
|
+
* Must have name `file_search`.
|
|
105
|
+
*
|
|
106
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
107
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
108
|
+
* @param ranking - The ranking options to use for the file search.
|
|
109
|
+
* @param filters - The filters to use for the file search.
|
|
110
|
+
*/
|
|
66
111
|
fileSearch: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
|
|
67
112
|
query: string;
|
|
68
113
|
}, {
|
|
@@ -80,6 +125,17 @@ declare const openaiTools: {
|
|
|
80
125
|
filters: any[];
|
|
81
126
|
};
|
|
82
127
|
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Web search allows models to access up-to-date information from the internet
|
|
130
|
+
* and provide answers with sourced citations.
|
|
131
|
+
*
|
|
132
|
+
* Must have name `web_search_preview`.
|
|
133
|
+
*
|
|
134
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
135
|
+
* @param userLocation - The user location to use for the web search.
|
|
136
|
+
*
|
|
137
|
+
* @deprecated Use `webSearch` instead.
|
|
138
|
+
*/
|
|
83
139
|
webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
|
|
84
140
|
searchContextSize?: "low" | "medium" | "high";
|
|
85
141
|
userLocation?: {
|
|
@@ -90,6 +146,16 @@ declare const openaiTools: {
|
|
|
90
146
|
timezone?: string;
|
|
91
147
|
};
|
|
92
148
|
}>;
|
|
149
|
+
/**
|
|
150
|
+
* Web search allows models to access up-to-date information from the internet
|
|
151
|
+
* and provide answers with sourced citations.
|
|
152
|
+
*
|
|
153
|
+
* Must have name `web_search`.
|
|
154
|
+
*
|
|
155
|
+
* @param filters - The filters to use for the web search.
|
|
156
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
157
|
+
* @param userLocation - The user location to use for the web search.
|
|
158
|
+
*/
|
|
93
159
|
webSearch: (args?: Parameters<typeof factory>[0]) => _ai_sdk_provider_utils.Tool<{}, unknown>;
|
|
94
160
|
};
|
|
95
161
|
|
package/dist/index.d.ts
CHANGED
|
@@ -58,11 +58,56 @@ declare const factory: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
|
|
|
58
58
|
}>;
|
|
59
59
|
|
|
60
60
|
declare const openaiTools: {
|
|
61
|
+
/**
|
|
62
|
+
* The Code Interpreter tool allows models to write and run Python code in a
|
|
63
|
+
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
64
|
+
* coding, and math.
|
|
65
|
+
*
|
|
66
|
+
* @param container - The container to use for the code interpreter.
|
|
67
|
+
*
|
|
68
|
+
* Must have name `code_interpreter`.
|
|
69
|
+
*/
|
|
61
70
|
codeInterpreter: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
|
|
62
71
|
container?: string | {
|
|
63
|
-
fileIds
|
|
72
|
+
fileIds
|
|
73
|
+
/**
|
|
74
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
75
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
76
|
+
* semantic and keyword search.
|
|
77
|
+
*
|
|
78
|
+
* Must have name `file_search`.
|
|
79
|
+
*
|
|
80
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
81
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
82
|
+
* @param ranking - The ranking options to use for the file search.
|
|
83
|
+
* @param filters - The filters to use for the file search.
|
|
84
|
+
*/
|
|
85
|
+
? /**
|
|
86
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
87
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
88
|
+
* semantic and keyword search.
|
|
89
|
+
*
|
|
90
|
+
* Must have name `file_search`.
|
|
91
|
+
*
|
|
92
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
93
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
94
|
+
* @param ranking - The ranking options to use for the file search.
|
|
95
|
+
* @param filters - The filters to use for the file search.
|
|
96
|
+
*/: string[];
|
|
64
97
|
};
|
|
65
98
|
}>;
|
|
99
|
+
/**
|
|
100
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
101
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
102
|
+
* semantic and keyword search.
|
|
103
|
+
*
|
|
104
|
+
* Must have name `file_search`.
|
|
105
|
+
*
|
|
106
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
107
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
108
|
+
* @param ranking - The ranking options to use for the file search.
|
|
109
|
+
* @param filters - The filters to use for the file search.
|
|
110
|
+
*/
|
|
66
111
|
fileSearch: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
|
|
67
112
|
query: string;
|
|
68
113
|
}, {
|
|
@@ -80,6 +125,17 @@ declare const openaiTools: {
|
|
|
80
125
|
filters: any[];
|
|
81
126
|
};
|
|
82
127
|
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Web search allows models to access up-to-date information from the internet
|
|
130
|
+
* and provide answers with sourced citations.
|
|
131
|
+
*
|
|
132
|
+
* Must have name `web_search_preview`.
|
|
133
|
+
*
|
|
134
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
135
|
+
* @param userLocation - The user location to use for the web search.
|
|
136
|
+
*
|
|
137
|
+
* @deprecated Use `webSearch` instead.
|
|
138
|
+
*/
|
|
83
139
|
webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
|
|
84
140
|
searchContextSize?: "low" | "medium" | "high";
|
|
85
141
|
userLocation?: {
|
|
@@ -90,6 +146,16 @@ declare const openaiTools: {
|
|
|
90
146
|
timezone?: string;
|
|
91
147
|
};
|
|
92
148
|
}>;
|
|
149
|
+
/**
|
|
150
|
+
* Web search allows models to access up-to-date information from the internet
|
|
151
|
+
* and provide answers with sourced citations.
|
|
152
|
+
*
|
|
153
|
+
* Must have name `web_search`.
|
|
154
|
+
*
|
|
155
|
+
* @param filters - The filters to use for the web search.
|
|
156
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
157
|
+
* @param userLocation - The user location to use for the web search.
|
|
158
|
+
*/
|
|
93
159
|
webSearch: (args?: Parameters<typeof factory>[0]) => _ai_sdk_provider_utils.Tool<{}, unknown>;
|
|
94
160
|
};
|
|
95
161
|
|
package/dist/index.js
CHANGED
|
@@ -369,23 +369,11 @@ var compoundFilterSchema = import_v43.z.object({
|
|
|
369
369
|
});
|
|
370
370
|
var filtersSchema = import_v43.z.union([comparisonFilterSchema, compoundFilterSchema]);
|
|
371
371
|
var fileSearchArgsSchema = import_v43.z.object({
|
|
372
|
-
/**
|
|
373
|
-
* List of vector store IDs to search through. If not provided, searches all available vector stores.
|
|
374
|
-
*/
|
|
375
372
|
vectorStoreIds: import_v43.z.array(import_v43.z.string()).optional(),
|
|
376
|
-
/**
|
|
377
|
-
* Maximum number of search results to return. Defaults to 10.
|
|
378
|
-
*/
|
|
379
373
|
maxNumResults: import_v43.z.number().optional(),
|
|
380
|
-
/**
|
|
381
|
-
* Ranking options for the search.
|
|
382
|
-
*/
|
|
383
374
|
ranking: import_v43.z.object({
|
|
384
375
|
ranker: import_v43.z.enum(["auto", "default-2024-08-21"]).optional()
|
|
385
376
|
}).optional(),
|
|
386
|
-
/**
|
|
387
|
-
* A filter to apply based on file attributes.
|
|
388
|
-
*/
|
|
389
377
|
filters: filtersSchema.optional()
|
|
390
378
|
});
|
|
391
379
|
var fileSearch = (0, import_provider_utils3.createProviderDefinedToolFactory)({
|
|
@@ -1868,9 +1856,51 @@ var webSearch = (args = {}) => {
|
|
|
1868
1856
|
|
|
1869
1857
|
// src/openai-tools.ts
|
|
1870
1858
|
var openaiTools = {
|
|
1859
|
+
/**
|
|
1860
|
+
* The Code Interpreter tool allows models to write and run Python code in a
|
|
1861
|
+
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
1862
|
+
* coding, and math.
|
|
1863
|
+
*
|
|
1864
|
+
* @param container - The container to use for the code interpreter.
|
|
1865
|
+
*
|
|
1866
|
+
* Must have name `code_interpreter`.
|
|
1867
|
+
*/
|
|
1871
1868
|
codeInterpreter,
|
|
1869
|
+
/**
|
|
1870
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
1871
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
1872
|
+
* semantic and keyword search.
|
|
1873
|
+
*
|
|
1874
|
+
* Must have name `file_search`.
|
|
1875
|
+
*
|
|
1876
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
1877
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
1878
|
+
* @param ranking - The ranking options to use for the file search.
|
|
1879
|
+
* @param filters - The filters to use for the file search.
|
|
1880
|
+
*/
|
|
1872
1881
|
fileSearch,
|
|
1882
|
+
/**
|
|
1883
|
+
* Web search allows models to access up-to-date information from the internet
|
|
1884
|
+
* and provide answers with sourced citations.
|
|
1885
|
+
*
|
|
1886
|
+
* Must have name `web_search_preview`.
|
|
1887
|
+
*
|
|
1888
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
1889
|
+
* @param userLocation - The user location to use for the web search.
|
|
1890
|
+
*
|
|
1891
|
+
* @deprecated Use `webSearch` instead.
|
|
1892
|
+
*/
|
|
1873
1893
|
webSearchPreview,
|
|
1894
|
+
/**
|
|
1895
|
+
* Web search allows models to access up-to-date information from the internet
|
|
1896
|
+
* and provide answers with sourced citations.
|
|
1897
|
+
*
|
|
1898
|
+
* Must have name `web_search`.
|
|
1899
|
+
*
|
|
1900
|
+
* @param filters - The filters to use for the web search.
|
|
1901
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
1902
|
+
* @param userLocation - The user location to use for the web search.
|
|
1903
|
+
*/
|
|
1874
1904
|
webSearch
|
|
1875
1905
|
};
|
|
1876
1906
|
|