@ai-sdk/openai 3.0.66 → 3.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal/index.d.mts +195 -1
- package/dist/internal/index.d.ts +195 -1
- package/dist/internal/index.js +11 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/internal/index.ts +1 -0
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -6812,7 +6812,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6812
6812
|
};
|
|
6813
6813
|
|
|
6814
6814
|
// src/version.ts
|
|
6815
|
-
var VERSION = true ? "3.0.
|
|
6815
|
+
var VERSION = true ? "3.0.67" : "0.0.0-test";
|
|
6816
6816
|
|
|
6817
6817
|
// src/openai-provider.ts
|
|
6818
6818
|
function createOpenAI(options = {}) {
|
package/dist/index.mjs
CHANGED
|
@@ -6934,7 +6934,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6934
6934
|
};
|
|
6935
6935
|
|
|
6936
6936
|
// src/version.ts
|
|
6937
|
-
var VERSION = true ? "3.0.
|
|
6937
|
+
var VERSION = true ? "3.0.67" : "0.0.0-test";
|
|
6938
6938
|
|
|
6939
6939
|
// src/openai-provider.ts
|
|
6940
6940
|
function createOpenAI(options = {}) {
|
|
@@ -1131,6 +1131,200 @@ declare const imageGeneration: (args?: ImageGenerationArgs) => _ai_sdk_provider_
|
|
|
1131
1131
|
result: string;
|
|
1132
1132
|
}>;
|
|
1133
1133
|
|
|
1134
|
+
declare const webSearchArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1135
|
+
externalWebAccess?: boolean | undefined;
|
|
1136
|
+
filters?: {
|
|
1137
|
+
allowedDomains?: string[] | undefined;
|
|
1138
|
+
} | undefined;
|
|
1139
|
+
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1140
|
+
userLocation?: {
|
|
1141
|
+
type: "approximate";
|
|
1142
|
+
country?: string | undefined;
|
|
1143
|
+
city?: string | undefined;
|
|
1144
|
+
region?: string | undefined;
|
|
1145
|
+
timezone?: string | undefined;
|
|
1146
|
+
} | undefined;
|
|
1147
|
+
}>;
|
|
1148
|
+
declare const webSearchOutputSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1149
|
+
action?: {
|
|
1150
|
+
type: "search";
|
|
1151
|
+
query?: string | undefined;
|
|
1152
|
+
queries?: string[] | undefined;
|
|
1153
|
+
} | {
|
|
1154
|
+
type: "openPage";
|
|
1155
|
+
url?: string | null | undefined;
|
|
1156
|
+
} | {
|
|
1157
|
+
type: "findInPage";
|
|
1158
|
+
url?: string | null | undefined;
|
|
1159
|
+
pattern?: string | null | undefined;
|
|
1160
|
+
} | undefined;
|
|
1161
|
+
sources?: ({
|
|
1162
|
+
type: "url";
|
|
1163
|
+
url: string;
|
|
1164
|
+
} | {
|
|
1165
|
+
type: "api";
|
|
1166
|
+
name: string;
|
|
1167
|
+
})[] | undefined;
|
|
1168
|
+
}>;
|
|
1169
|
+
declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
|
|
1170
|
+
/**
|
|
1171
|
+
* An object describing the specific action taken in this web search call.
|
|
1172
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1173
|
+
*/
|
|
1174
|
+
action?: {
|
|
1175
|
+
/**
|
|
1176
|
+
* Action type "search" - Performs a web search query.
|
|
1177
|
+
*/
|
|
1178
|
+
type: "search";
|
|
1179
|
+
/**
|
|
1180
|
+
* The search query.
|
|
1181
|
+
*
|
|
1182
|
+
* @deprecated Use `queries` instead.
|
|
1183
|
+
*/
|
|
1184
|
+
query?: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* The search queries the model used.
|
|
1187
|
+
*/
|
|
1188
|
+
queries?: string[];
|
|
1189
|
+
} | {
|
|
1190
|
+
/**
|
|
1191
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
1192
|
+
*/
|
|
1193
|
+
type: "openPage";
|
|
1194
|
+
/**
|
|
1195
|
+
* The URL opened by the model.
|
|
1196
|
+
*/
|
|
1197
|
+
url?: string | null;
|
|
1198
|
+
} | {
|
|
1199
|
+
/**
|
|
1200
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1201
|
+
*/
|
|
1202
|
+
type: "findInPage";
|
|
1203
|
+
/**
|
|
1204
|
+
* The URL of the page searched for the pattern.
|
|
1205
|
+
*/
|
|
1206
|
+
url?: string | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* The pattern or text to search for within the page.
|
|
1209
|
+
*/
|
|
1210
|
+
pattern?: string | null;
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* Optional sources cited by the model for the web search call.
|
|
1214
|
+
*/
|
|
1215
|
+
sources?: Array<{
|
|
1216
|
+
type: "url";
|
|
1217
|
+
url: string;
|
|
1218
|
+
} | {
|
|
1219
|
+
type: "api";
|
|
1220
|
+
name: string;
|
|
1221
|
+
}>;
|
|
1222
|
+
}, {
|
|
1223
|
+
/**
|
|
1224
|
+
* Whether to use external web access for fetching live content.
|
|
1225
|
+
* - true: Fetch live web content (default)
|
|
1226
|
+
* - false: Use cached/indexed results
|
|
1227
|
+
*/
|
|
1228
|
+
externalWebAccess?: boolean;
|
|
1229
|
+
/**
|
|
1230
|
+
* Filters for the search.
|
|
1231
|
+
*/
|
|
1232
|
+
filters?: {
|
|
1233
|
+
/**
|
|
1234
|
+
* Allowed domains for the search.
|
|
1235
|
+
* If not provided, all domains are allowed.
|
|
1236
|
+
* Subdomains of the provided domains are allowed as well.
|
|
1237
|
+
*/
|
|
1238
|
+
allowedDomains?: string[];
|
|
1239
|
+
};
|
|
1240
|
+
/**
|
|
1241
|
+
* Search context size to use for the web search.
|
|
1242
|
+
* - high: Most comprehensive context, highest cost, slower response
|
|
1243
|
+
* - medium: Balanced context, cost, and latency (default)
|
|
1244
|
+
* - low: Least context, lowest cost, fastest response
|
|
1245
|
+
*/
|
|
1246
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
1247
|
+
/**
|
|
1248
|
+
* User location information to provide geographically relevant search results.
|
|
1249
|
+
*/
|
|
1250
|
+
userLocation?: {
|
|
1251
|
+
/**
|
|
1252
|
+
* Type of location (always 'approximate')
|
|
1253
|
+
*/
|
|
1254
|
+
type: "approximate";
|
|
1255
|
+
/**
|
|
1256
|
+
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
1257
|
+
*/
|
|
1258
|
+
country?: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* City name (free text, e.g., 'Minneapolis')
|
|
1261
|
+
*/
|
|
1262
|
+
city?: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* Region name (free text, e.g., 'Minnesota')
|
|
1265
|
+
*/
|
|
1266
|
+
region?: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* IANA timezone (e.g., 'America/Chicago')
|
|
1269
|
+
*/
|
|
1270
|
+
timezone?: string;
|
|
1271
|
+
};
|
|
1272
|
+
}>;
|
|
1273
|
+
declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.Tool<{}, {
|
|
1274
|
+
/**
|
|
1275
|
+
* An object describing the specific action taken in this web search call.
|
|
1276
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1277
|
+
*/
|
|
1278
|
+
action?: {
|
|
1279
|
+
/**
|
|
1280
|
+
* Action type "search" - Performs a web search query.
|
|
1281
|
+
*/
|
|
1282
|
+
type: "search";
|
|
1283
|
+
/**
|
|
1284
|
+
* The search query.
|
|
1285
|
+
*
|
|
1286
|
+
* @deprecated Use `queries` instead.
|
|
1287
|
+
*/
|
|
1288
|
+
query?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* The search queries the model used.
|
|
1291
|
+
*/
|
|
1292
|
+
queries?: string[];
|
|
1293
|
+
} | {
|
|
1294
|
+
/**
|
|
1295
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
1296
|
+
*/
|
|
1297
|
+
type: "openPage";
|
|
1298
|
+
/**
|
|
1299
|
+
* The URL opened by the model.
|
|
1300
|
+
*/
|
|
1301
|
+
url?: string | null;
|
|
1302
|
+
} | {
|
|
1303
|
+
/**
|
|
1304
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1305
|
+
*/
|
|
1306
|
+
type: "findInPage";
|
|
1307
|
+
/**
|
|
1308
|
+
* The URL of the page searched for the pattern.
|
|
1309
|
+
*/
|
|
1310
|
+
url?: string | null;
|
|
1311
|
+
/**
|
|
1312
|
+
* The pattern or text to search for within the page.
|
|
1313
|
+
*/
|
|
1314
|
+
pattern?: string | null;
|
|
1315
|
+
};
|
|
1316
|
+
/**
|
|
1317
|
+
* Optional sources cited by the model for the web search call.
|
|
1318
|
+
*/
|
|
1319
|
+
sources?: Array<{
|
|
1320
|
+
type: "url";
|
|
1321
|
+
url: string;
|
|
1322
|
+
} | {
|
|
1323
|
+
type: "api";
|
|
1324
|
+
name: string;
|
|
1325
|
+
}>;
|
|
1326
|
+
}>;
|
|
1327
|
+
|
|
1134
1328
|
declare const webSearchPreviewArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1135
1329
|
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1136
1330
|
userLocation?: {
|
|
@@ -1214,4 +1408,4 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOu
|
|
|
1214
1408
|
};
|
|
1215
1409
|
}>;
|
|
1216
1410
|
|
|
1217
|
-
export { type ApplyPatchOperation, OpenAIChatLanguageModel, type OpenAIChatModelId, OpenAICompletionLanguageModel, type OpenAICompletionModelId, OpenAIEmbeddingModel, type OpenAIEmbeddingModelId, type OpenAIEmbeddingModelOptions, OpenAIImageModel, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelId, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, OpenAIResponsesLanguageModel, OpenAISpeechModel, type OpenAISpeechModelId, type OpenAISpeechModelOptions, type OpenAITranscriptionCallOptions, OpenAITranscriptionModel, type OpenAITranscriptionModelId, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type ResponsesProviderMetadata, type ResponsesReasoningProviderMetadata, type ResponsesSourceDocumentProviderMetadata, type ResponsesTextProviderMetadata, applyPatch, applyPatchArgsSchema, applyPatchInputSchema, applyPatchOutputSchema, applyPatchToolFactory, codeInterpreter, codeInterpreterArgsSchema, codeInterpreterInputSchema, codeInterpreterOutputSchema, codeInterpreterToolFactory, fileSearch, fileSearchArgsSchema, fileSearchOutputSchema, hasDefaultResponseFormat, imageGeneration, imageGenerationArgsSchema, imageGenerationOutputSchema, modelMaxImagesPerCall, openAITranscriptionModelOptions, openaiEmbeddingModelOptions, openaiImageModelEditOptions, openaiImageModelGenerationOptions, openaiImageModelOptions, openaiLanguageModelChatOptions, openaiLanguageModelCompletionOptions, openaiSpeechModelOptionsSchema, webSearchPreview, webSearchPreviewArgsSchema, webSearchPreviewInputSchema };
|
|
1411
|
+
export { type ApplyPatchOperation, OpenAIChatLanguageModel, type OpenAIChatModelId, OpenAICompletionLanguageModel, type OpenAICompletionModelId, OpenAIEmbeddingModel, type OpenAIEmbeddingModelId, type OpenAIEmbeddingModelOptions, OpenAIImageModel, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelId, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, OpenAIResponsesLanguageModel, OpenAISpeechModel, type OpenAISpeechModelId, type OpenAISpeechModelOptions, type OpenAITranscriptionCallOptions, OpenAITranscriptionModel, type OpenAITranscriptionModelId, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type ResponsesProviderMetadata, type ResponsesReasoningProviderMetadata, type ResponsesSourceDocumentProviderMetadata, type ResponsesTextProviderMetadata, applyPatch, applyPatchArgsSchema, applyPatchInputSchema, applyPatchOutputSchema, applyPatchToolFactory, codeInterpreter, codeInterpreterArgsSchema, codeInterpreterInputSchema, codeInterpreterOutputSchema, codeInterpreterToolFactory, fileSearch, fileSearchArgsSchema, fileSearchOutputSchema, hasDefaultResponseFormat, imageGeneration, imageGenerationArgsSchema, imageGenerationOutputSchema, modelMaxImagesPerCall, openAITranscriptionModelOptions, openaiEmbeddingModelOptions, openaiImageModelEditOptions, openaiImageModelGenerationOptions, openaiImageModelOptions, openaiLanguageModelChatOptions, openaiLanguageModelCompletionOptions, openaiSpeechModelOptionsSchema, webSearch, webSearchArgsSchema, webSearchOutputSchema, webSearchPreview, webSearchPreviewArgsSchema, webSearchPreviewInputSchema, webSearchToolFactory };
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1131,6 +1131,200 @@ declare const imageGeneration: (args?: ImageGenerationArgs) => _ai_sdk_provider_
|
|
|
1131
1131
|
result: string;
|
|
1132
1132
|
}>;
|
|
1133
1133
|
|
|
1134
|
+
declare const webSearchArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1135
|
+
externalWebAccess?: boolean | undefined;
|
|
1136
|
+
filters?: {
|
|
1137
|
+
allowedDomains?: string[] | undefined;
|
|
1138
|
+
} | undefined;
|
|
1139
|
+
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1140
|
+
userLocation?: {
|
|
1141
|
+
type: "approximate";
|
|
1142
|
+
country?: string | undefined;
|
|
1143
|
+
city?: string | undefined;
|
|
1144
|
+
region?: string | undefined;
|
|
1145
|
+
timezone?: string | undefined;
|
|
1146
|
+
} | undefined;
|
|
1147
|
+
}>;
|
|
1148
|
+
declare const webSearchOutputSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1149
|
+
action?: {
|
|
1150
|
+
type: "search";
|
|
1151
|
+
query?: string | undefined;
|
|
1152
|
+
queries?: string[] | undefined;
|
|
1153
|
+
} | {
|
|
1154
|
+
type: "openPage";
|
|
1155
|
+
url?: string | null | undefined;
|
|
1156
|
+
} | {
|
|
1157
|
+
type: "findInPage";
|
|
1158
|
+
url?: string | null | undefined;
|
|
1159
|
+
pattern?: string | null | undefined;
|
|
1160
|
+
} | undefined;
|
|
1161
|
+
sources?: ({
|
|
1162
|
+
type: "url";
|
|
1163
|
+
url: string;
|
|
1164
|
+
} | {
|
|
1165
|
+
type: "api";
|
|
1166
|
+
name: string;
|
|
1167
|
+
})[] | undefined;
|
|
1168
|
+
}>;
|
|
1169
|
+
declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
|
|
1170
|
+
/**
|
|
1171
|
+
* An object describing the specific action taken in this web search call.
|
|
1172
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1173
|
+
*/
|
|
1174
|
+
action?: {
|
|
1175
|
+
/**
|
|
1176
|
+
* Action type "search" - Performs a web search query.
|
|
1177
|
+
*/
|
|
1178
|
+
type: "search";
|
|
1179
|
+
/**
|
|
1180
|
+
* The search query.
|
|
1181
|
+
*
|
|
1182
|
+
* @deprecated Use `queries` instead.
|
|
1183
|
+
*/
|
|
1184
|
+
query?: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* The search queries the model used.
|
|
1187
|
+
*/
|
|
1188
|
+
queries?: string[];
|
|
1189
|
+
} | {
|
|
1190
|
+
/**
|
|
1191
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
1192
|
+
*/
|
|
1193
|
+
type: "openPage";
|
|
1194
|
+
/**
|
|
1195
|
+
* The URL opened by the model.
|
|
1196
|
+
*/
|
|
1197
|
+
url?: string | null;
|
|
1198
|
+
} | {
|
|
1199
|
+
/**
|
|
1200
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1201
|
+
*/
|
|
1202
|
+
type: "findInPage";
|
|
1203
|
+
/**
|
|
1204
|
+
* The URL of the page searched for the pattern.
|
|
1205
|
+
*/
|
|
1206
|
+
url?: string | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* The pattern or text to search for within the page.
|
|
1209
|
+
*/
|
|
1210
|
+
pattern?: string | null;
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* Optional sources cited by the model for the web search call.
|
|
1214
|
+
*/
|
|
1215
|
+
sources?: Array<{
|
|
1216
|
+
type: "url";
|
|
1217
|
+
url: string;
|
|
1218
|
+
} | {
|
|
1219
|
+
type: "api";
|
|
1220
|
+
name: string;
|
|
1221
|
+
}>;
|
|
1222
|
+
}, {
|
|
1223
|
+
/**
|
|
1224
|
+
* Whether to use external web access for fetching live content.
|
|
1225
|
+
* - true: Fetch live web content (default)
|
|
1226
|
+
* - false: Use cached/indexed results
|
|
1227
|
+
*/
|
|
1228
|
+
externalWebAccess?: boolean;
|
|
1229
|
+
/**
|
|
1230
|
+
* Filters for the search.
|
|
1231
|
+
*/
|
|
1232
|
+
filters?: {
|
|
1233
|
+
/**
|
|
1234
|
+
* Allowed domains for the search.
|
|
1235
|
+
* If not provided, all domains are allowed.
|
|
1236
|
+
* Subdomains of the provided domains are allowed as well.
|
|
1237
|
+
*/
|
|
1238
|
+
allowedDomains?: string[];
|
|
1239
|
+
};
|
|
1240
|
+
/**
|
|
1241
|
+
* Search context size to use for the web search.
|
|
1242
|
+
* - high: Most comprehensive context, highest cost, slower response
|
|
1243
|
+
* - medium: Balanced context, cost, and latency (default)
|
|
1244
|
+
* - low: Least context, lowest cost, fastest response
|
|
1245
|
+
*/
|
|
1246
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
1247
|
+
/**
|
|
1248
|
+
* User location information to provide geographically relevant search results.
|
|
1249
|
+
*/
|
|
1250
|
+
userLocation?: {
|
|
1251
|
+
/**
|
|
1252
|
+
* Type of location (always 'approximate')
|
|
1253
|
+
*/
|
|
1254
|
+
type: "approximate";
|
|
1255
|
+
/**
|
|
1256
|
+
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
1257
|
+
*/
|
|
1258
|
+
country?: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* City name (free text, e.g., 'Minneapolis')
|
|
1261
|
+
*/
|
|
1262
|
+
city?: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* Region name (free text, e.g., 'Minnesota')
|
|
1265
|
+
*/
|
|
1266
|
+
region?: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* IANA timezone (e.g., 'America/Chicago')
|
|
1269
|
+
*/
|
|
1270
|
+
timezone?: string;
|
|
1271
|
+
};
|
|
1272
|
+
}>;
|
|
1273
|
+
declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.Tool<{}, {
|
|
1274
|
+
/**
|
|
1275
|
+
* An object describing the specific action taken in this web search call.
|
|
1276
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1277
|
+
*/
|
|
1278
|
+
action?: {
|
|
1279
|
+
/**
|
|
1280
|
+
* Action type "search" - Performs a web search query.
|
|
1281
|
+
*/
|
|
1282
|
+
type: "search";
|
|
1283
|
+
/**
|
|
1284
|
+
* The search query.
|
|
1285
|
+
*
|
|
1286
|
+
* @deprecated Use `queries` instead.
|
|
1287
|
+
*/
|
|
1288
|
+
query?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* The search queries the model used.
|
|
1291
|
+
*/
|
|
1292
|
+
queries?: string[];
|
|
1293
|
+
} | {
|
|
1294
|
+
/**
|
|
1295
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
1296
|
+
*/
|
|
1297
|
+
type: "openPage";
|
|
1298
|
+
/**
|
|
1299
|
+
* The URL opened by the model.
|
|
1300
|
+
*/
|
|
1301
|
+
url?: string | null;
|
|
1302
|
+
} | {
|
|
1303
|
+
/**
|
|
1304
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1305
|
+
*/
|
|
1306
|
+
type: "findInPage";
|
|
1307
|
+
/**
|
|
1308
|
+
* The URL of the page searched for the pattern.
|
|
1309
|
+
*/
|
|
1310
|
+
url?: string | null;
|
|
1311
|
+
/**
|
|
1312
|
+
* The pattern or text to search for within the page.
|
|
1313
|
+
*/
|
|
1314
|
+
pattern?: string | null;
|
|
1315
|
+
};
|
|
1316
|
+
/**
|
|
1317
|
+
* Optional sources cited by the model for the web search call.
|
|
1318
|
+
*/
|
|
1319
|
+
sources?: Array<{
|
|
1320
|
+
type: "url";
|
|
1321
|
+
url: string;
|
|
1322
|
+
} | {
|
|
1323
|
+
type: "api";
|
|
1324
|
+
name: string;
|
|
1325
|
+
}>;
|
|
1326
|
+
}>;
|
|
1327
|
+
|
|
1134
1328
|
declare const webSearchPreviewArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1135
1329
|
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1136
1330
|
userLocation?: {
|
|
@@ -1214,4 +1408,4 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOu
|
|
|
1214
1408
|
};
|
|
1215
1409
|
}>;
|
|
1216
1410
|
|
|
1217
|
-
export { type ApplyPatchOperation, OpenAIChatLanguageModel, type OpenAIChatModelId, OpenAICompletionLanguageModel, type OpenAICompletionModelId, OpenAIEmbeddingModel, type OpenAIEmbeddingModelId, type OpenAIEmbeddingModelOptions, OpenAIImageModel, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelId, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, OpenAIResponsesLanguageModel, OpenAISpeechModel, type OpenAISpeechModelId, type OpenAISpeechModelOptions, type OpenAITranscriptionCallOptions, OpenAITranscriptionModel, type OpenAITranscriptionModelId, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type ResponsesProviderMetadata, type ResponsesReasoningProviderMetadata, type ResponsesSourceDocumentProviderMetadata, type ResponsesTextProviderMetadata, applyPatch, applyPatchArgsSchema, applyPatchInputSchema, applyPatchOutputSchema, applyPatchToolFactory, codeInterpreter, codeInterpreterArgsSchema, codeInterpreterInputSchema, codeInterpreterOutputSchema, codeInterpreterToolFactory, fileSearch, fileSearchArgsSchema, fileSearchOutputSchema, hasDefaultResponseFormat, imageGeneration, imageGenerationArgsSchema, imageGenerationOutputSchema, modelMaxImagesPerCall, openAITranscriptionModelOptions, openaiEmbeddingModelOptions, openaiImageModelEditOptions, openaiImageModelGenerationOptions, openaiImageModelOptions, openaiLanguageModelChatOptions, openaiLanguageModelCompletionOptions, openaiSpeechModelOptionsSchema, webSearchPreview, webSearchPreviewArgsSchema, webSearchPreviewInputSchema };
|
|
1411
|
+
export { type ApplyPatchOperation, OpenAIChatLanguageModel, type OpenAIChatModelId, OpenAICompletionLanguageModel, type OpenAICompletionModelId, OpenAIEmbeddingModel, type OpenAIEmbeddingModelId, type OpenAIEmbeddingModelOptions, OpenAIImageModel, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelId, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, OpenAIResponsesLanguageModel, OpenAISpeechModel, type OpenAISpeechModelId, type OpenAISpeechModelOptions, type OpenAITranscriptionCallOptions, OpenAITranscriptionModel, type OpenAITranscriptionModelId, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type ResponsesProviderMetadata, type ResponsesReasoningProviderMetadata, type ResponsesSourceDocumentProviderMetadata, type ResponsesTextProviderMetadata, applyPatch, applyPatchArgsSchema, applyPatchInputSchema, applyPatchOutputSchema, applyPatchToolFactory, codeInterpreter, codeInterpreterArgsSchema, codeInterpreterInputSchema, codeInterpreterOutputSchema, codeInterpreterToolFactory, fileSearch, fileSearchArgsSchema, fileSearchOutputSchema, hasDefaultResponseFormat, imageGeneration, imageGenerationArgsSchema, imageGenerationOutputSchema, modelMaxImagesPerCall, openAITranscriptionModelOptions, openaiEmbeddingModelOptions, openaiImageModelEditOptions, openaiImageModelGenerationOptions, openaiImageModelOptions, openaiLanguageModelChatOptions, openaiLanguageModelCompletionOptions, openaiSpeechModelOptionsSchema, webSearch, webSearchArgsSchema, webSearchOutputSchema, webSearchPreview, webSearchPreviewArgsSchema, webSearchPreviewInputSchema, webSearchToolFactory };
|
package/dist/internal/index.js
CHANGED
|
@@ -53,9 +53,13 @@ __export(index_exports, {
|
|
|
53
53
|
openaiLanguageModelChatOptions: () => openaiLanguageModelChatOptions,
|
|
54
54
|
openaiLanguageModelCompletionOptions: () => openaiLanguageModelCompletionOptions,
|
|
55
55
|
openaiSpeechModelOptionsSchema: () => openaiSpeechModelOptionsSchema,
|
|
56
|
+
webSearch: () => webSearch,
|
|
57
|
+
webSearchArgsSchema: () => webSearchArgsSchema,
|
|
58
|
+
webSearchOutputSchema: () => webSearchOutputSchema,
|
|
56
59
|
webSearchPreview: () => webSearchPreview,
|
|
57
60
|
webSearchPreviewArgsSchema: () => webSearchPreviewArgsSchema,
|
|
58
|
-
webSearchPreviewInputSchema: () => webSearchPreviewInputSchema
|
|
61
|
+
webSearchPreviewInputSchema: () => webSearchPreviewInputSchema,
|
|
62
|
+
webSearchToolFactory: () => webSearchToolFactory
|
|
59
63
|
});
|
|
60
64
|
module.exports = __toCommonJS(index_exports);
|
|
61
65
|
|
|
@@ -4678,6 +4682,7 @@ var webSearchToolFactory = (0, import_provider_utils32.createProviderToolFactory
|
|
|
4678
4682
|
inputSchema: webSearchInputSchema,
|
|
4679
4683
|
outputSchema: webSearchOutputSchema
|
|
4680
4684
|
});
|
|
4685
|
+
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
4681
4686
|
|
|
4682
4687
|
// src/tool/web-search-preview.ts
|
|
4683
4688
|
var import_provider_utils33 = require("@ai-sdk/provider-utils");
|
|
@@ -6757,8 +6762,12 @@ function escapeJSONDelta(delta) {
|
|
|
6757
6762
|
openaiLanguageModelChatOptions,
|
|
6758
6763
|
openaiLanguageModelCompletionOptions,
|
|
6759
6764
|
openaiSpeechModelOptionsSchema,
|
|
6765
|
+
webSearch,
|
|
6766
|
+
webSearchArgsSchema,
|
|
6767
|
+
webSearchOutputSchema,
|
|
6760
6768
|
webSearchPreview,
|
|
6761
6769
|
webSearchPreviewArgsSchema,
|
|
6762
|
-
webSearchPreviewInputSchema
|
|
6770
|
+
webSearchPreviewInputSchema,
|
|
6771
|
+
webSearchToolFactory
|
|
6763
6772
|
});
|
|
6764
6773
|
//# sourceMappingURL=index.js.map
|