@ai-sdk/openai 4.0.0-beta.23 → 4.0.0-beta.25
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 +18 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +112 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +116 -16
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +20 -14
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +24 -15
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/openai-provider.ts +16 -1
- package/src/responses/openai-responses-prepare-tools.ts +13 -5
- package/src/skills/openai-skills-api.ts +31 -0
- package/src/skills/openai-skills.ts +87 -0
- package/src/tool/shell.ts +7 -2
package/dist/internal/index.mjs
CHANGED
|
@@ -2528,7 +2528,7 @@ var shellSkillsSchema = z14.array(
|
|
|
2528
2528
|
z14.discriminatedUnion("type", [
|
|
2529
2529
|
z14.object({
|
|
2530
2530
|
type: z14.literal("skillReference"),
|
|
2531
|
-
|
|
2531
|
+
providerReference: z14.record(z14.string(), z14.string()),
|
|
2532
2532
|
version: z14.string().optional()
|
|
2533
2533
|
}),
|
|
2534
2534
|
z14.object({
|
|
@@ -4386,7 +4386,10 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4386
4386
|
import {
|
|
4387
4387
|
UnsupportedFunctionalityError as UnsupportedFunctionalityError5
|
|
4388
4388
|
} from "@ai-sdk/provider";
|
|
4389
|
-
import {
|
|
4389
|
+
import {
|
|
4390
|
+
resolveProviderReference as resolveProviderReference3,
|
|
4391
|
+
validateTypes as validateTypes2
|
|
4392
|
+
} from "@ai-sdk/provider-utils";
|
|
4390
4393
|
|
|
4391
4394
|
// src/tool/code-interpreter.ts
|
|
4392
4395
|
import {
|
|
@@ -4985,19 +4988,25 @@ function mapShellEnvironment(environment) {
|
|
|
4985
4988
|
}
|
|
4986
4989
|
function mapShellSkills(skills) {
|
|
4987
4990
|
return skills == null ? void 0 : skills.map(
|
|
4988
|
-
(skill) =>
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4991
|
+
(skill) => {
|
|
4992
|
+
var _a, _b;
|
|
4993
|
+
return skill.type === "skillReference" ? {
|
|
4994
|
+
type: "skill_reference",
|
|
4995
|
+
skill_id: resolveProviderReference3({
|
|
4996
|
+
reference: (_a = skill.providerReference) != null ? _a : {},
|
|
4997
|
+
provider: "openai"
|
|
4998
|
+
}),
|
|
4999
|
+
version: (_b = skill.version) != null ? _b : "latest"
|
|
5000
|
+
} : {
|
|
5001
|
+
type: "inline",
|
|
5002
|
+
name: skill.name,
|
|
5003
|
+
description: skill.description,
|
|
5004
|
+
source: {
|
|
5005
|
+
type: "base64",
|
|
5006
|
+
media_type: skill.source.mediaType,
|
|
5007
|
+
data: skill.source.data
|
|
5008
|
+
}
|
|
5009
|
+
};
|
|
5001
5010
|
}
|
|
5002
5011
|
);
|
|
5003
5012
|
}
|