@ai-sdk/openai 2.0.115 → 2.0.116
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 +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +190 -1
- package/dist/internal/index.d.ts +190 -1
- package/dist/internal/index.js +19 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -3587,7 +3587,10 @@ var webSearchArgsSchema = lazySchema4(
|
|
|
3587
3587
|
() => zodSchema17(
|
|
3588
3588
|
z19.object({
|
|
3589
3589
|
externalWebAccess: z19.boolean().optional(),
|
|
3590
|
-
filters: z19.object({
|
|
3590
|
+
filters: z19.object({
|
|
3591
|
+
allowedDomains: z19.array(z19.string()).optional(),
|
|
3592
|
+
blockedDomains: z19.array(z19.string()).optional()
|
|
3593
|
+
}).optional(),
|
|
3591
3594
|
searchContextSize: z19.enum(["low", "medium", "high"]).optional(),
|
|
3592
3595
|
userLocation: z19.object({
|
|
3593
3596
|
type: z19.literal("approximate"),
|
|
@@ -3633,6 +3636,7 @@ var webSearchToolFactory = createProviderDefinedToolFactoryWithOutputSchema4({
|
|
|
3633
3636
|
inputSchema: webSearchInputSchema,
|
|
3634
3637
|
outputSchema: webSearchOutputSchema
|
|
3635
3638
|
});
|
|
3639
|
+
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
3636
3640
|
|
|
3637
3641
|
// src/tool/web-search-preview.ts
|
|
3638
3642
|
import {
|
|
@@ -3794,7 +3798,10 @@ async function prepareResponsesTools({
|
|
|
3794
3798
|
});
|
|
3795
3799
|
openaiTools.push({
|
|
3796
3800
|
type: "web_search",
|
|
3797
|
-
filters: args.filters != null ? {
|
|
3801
|
+
filters: args.filters != null ? {
|
|
3802
|
+
allowed_domains: args.filters.allowedDomains,
|
|
3803
|
+
blocked_domains: args.filters.blockedDomains
|
|
3804
|
+
} : void 0,
|
|
3798
3805
|
external_web_access: args.externalWebAccess,
|
|
3799
3806
|
search_context_size: args.searchContextSize,
|
|
3800
3807
|
user_location: args.userLocation
|
|
@@ -5040,8 +5047,12 @@ export {
|
|
|
5040
5047
|
openaiImageModelGenerationOptions,
|
|
5041
5048
|
openaiImageModelOptions,
|
|
5042
5049
|
openaiSpeechProviderOptionsSchema,
|
|
5050
|
+
webSearch,
|
|
5051
|
+
webSearchArgsSchema,
|
|
5052
|
+
webSearchOutputSchema,
|
|
5043
5053
|
webSearchPreview,
|
|
5044
5054
|
webSearchPreviewArgsSchema,
|
|
5045
|
-
webSearchPreviewInputSchema
|
|
5055
|
+
webSearchPreviewInputSchema,
|
|
5056
|
+
webSearchToolFactory
|
|
5046
5057
|
};
|
|
5047
5058
|
//# sourceMappingURL=index.mjs.map
|