@ai-sdk/openai 2.0.0-beta.6 → 2.0.0-beta.7
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 +11 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -2232,6 +2232,16 @@ function prepareResponsesTools({
|
|
|
2232
2232
|
break;
|
|
2233
2233
|
case "provider-defined":
|
|
2234
2234
|
switch (tool.id) {
|
|
2235
|
+
case "openai.file_search": {
|
|
2236
|
+
const args = fileSearchArgsSchema.parse(tool.args);
|
|
2237
|
+
openaiTools.push({
|
|
2238
|
+
type: "file_search",
|
|
2239
|
+
vector_store_ids: args.vectorStoreIds,
|
|
2240
|
+
max_results: args.maxResults,
|
|
2241
|
+
search_type: args.searchType
|
|
2242
|
+
});
|
|
2243
|
+
break;
|
|
2244
|
+
}
|
|
2235
2245
|
case "openai.web_search_preview":
|
|
2236
2246
|
openaiTools.push({
|
|
2237
2247
|
type: "web_search_preview",
|
|
@@ -2261,7 +2271,7 @@ function prepareResponsesTools({
|
|
|
2261
2271
|
case "tool":
|
|
2262
2272
|
return {
|
|
2263
2273
|
tools: openaiTools,
|
|
2264
|
-
toolChoice: toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
|
|
2274
|
+
toolChoice: toolChoice.toolName === "file_search" ? { type: "file_search" } : toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
|
|
2265
2275
|
toolWarnings
|
|
2266
2276
|
};
|
|
2267
2277
|
default: {
|