@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/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2103,6 +2103,16 @@ function prepareResponsesTools({
|
|
|
2103
2103
|
break;
|
|
2104
2104
|
case "provider-defined":
|
|
2105
2105
|
switch (tool.id) {
|
|
2106
|
+
case "openai.file_search": {
|
|
2107
|
+
const args = fileSearchArgsSchema.parse(tool.args);
|
|
2108
|
+
openaiTools2.push({
|
|
2109
|
+
type: "file_search",
|
|
2110
|
+
vector_store_ids: args.vectorStoreIds,
|
|
2111
|
+
max_results: args.maxResults,
|
|
2112
|
+
search_type: args.searchType
|
|
2113
|
+
});
|
|
2114
|
+
break;
|
|
2115
|
+
}
|
|
2106
2116
|
case "openai.web_search_preview":
|
|
2107
2117
|
openaiTools2.push({
|
|
2108
2118
|
type: "web_search_preview",
|
|
@@ -2132,7 +2142,7 @@ function prepareResponsesTools({
|
|
|
2132
2142
|
case "tool":
|
|
2133
2143
|
return {
|
|
2134
2144
|
tools: openaiTools2,
|
|
2135
|
-
toolChoice: toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
|
|
2145
|
+
toolChoice: toolChoice.toolName === "file_search" ? { type: "file_search" } : toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
|
|
2136
2146
|
toolWarnings
|
|
2137
2147
|
};
|
|
2138
2148
|
default: {
|