@ai-sdk/openai 3.0.133 → 3.0.134
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 +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 +232 -216
- package/dist/internal/index.d.ts +232 -216
- package/dist/internal/index.js +10 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/responses/openai-responses-language-model.ts +16 -2
package/dist/index.mjs
CHANGED
|
@@ -6772,7 +6772,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
6772
6772
|
toolName: toolNameMapping.toCustomToolName(
|
|
6773
6773
|
webSearchToolName != null ? webSearchToolName : "web_search"
|
|
6774
6774
|
),
|
|
6775
|
-
|
|
6775
|
+
...mapWebSearchResult(part)
|
|
6776
6776
|
});
|
|
6777
6777
|
break;
|
|
6778
6778
|
}
|
|
@@ -7376,7 +7376,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
7376
7376
|
toolName: toolNameMapping.toCustomToolName(
|
|
7377
7377
|
webSearchToolName != null ? webSearchToolName : "web_search"
|
|
7378
7378
|
),
|
|
7379
|
-
|
|
7379
|
+
...mapWebSearchResult(value.item)
|
|
7380
7380
|
});
|
|
7381
7381
|
} else if (value.item.type === "computer_call") {
|
|
7382
7382
|
ongoingToolCalls[value.output_index] = void 0;
|
|
@@ -8058,6 +8058,12 @@ function isErrorChunk(chunk) {
|
|
|
8058
8058
|
function isResponseOutputChunk(chunk) {
|
|
8059
8059
|
return !(chunk.type === "response.created" || chunk.type === "response.failed" || chunk.type === "error" || chunk.type === "unknown_chunk");
|
|
8060
8060
|
}
|
|
8061
|
+
function mapWebSearchResult({
|
|
8062
|
+
action,
|
|
8063
|
+
status
|
|
8064
|
+
}) {
|
|
8065
|
+
return status === "completed" ? { result: mapWebSearchOutput(action) } : { isError: true, result: { status } };
|
|
8066
|
+
}
|
|
8061
8067
|
function mapWebSearchOutput(action) {
|
|
8062
8068
|
var _a2;
|
|
8063
8069
|
if (action == null) {
|
|
@@ -8467,7 +8473,7 @@ var OpenAITranscriptionModel = class {
|
|
|
8467
8473
|
};
|
|
8468
8474
|
|
|
8469
8475
|
// src/version.ts
|
|
8470
|
-
var VERSION = true ? "3.0.
|
|
8476
|
+
var VERSION = true ? "3.0.134" : "0.0.0-test";
|
|
8471
8477
|
|
|
8472
8478
|
// src/openai-provider.ts
|
|
8473
8479
|
function createOpenAI(options = {}) {
|