@ai-sdk/openai 2.0.85 → 2.0.86
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 +17 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -13
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +16 -12
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +16 -12
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.js
CHANGED
|
@@ -325,10 +325,12 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
|
|
|
325
325
|
annotations: import_v42.z.array(
|
|
326
326
|
import_v42.z.object({
|
|
327
327
|
type: import_v42.z.literal("url_citation"),
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
328
|
+
url_citation: import_v42.z.object({
|
|
329
|
+
start_index: import_v42.z.number(),
|
|
330
|
+
end_index: import_v42.z.number(),
|
|
331
|
+
url: import_v42.z.string(),
|
|
332
|
+
title: import_v42.z.string()
|
|
333
|
+
})
|
|
332
334
|
})
|
|
333
335
|
).nullish()
|
|
334
336
|
}),
|
|
@@ -392,10 +394,12 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
|
|
|
392
394
|
annotations: import_v42.z.array(
|
|
393
395
|
import_v42.z.object({
|
|
394
396
|
type: import_v42.z.literal("url_citation"),
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
url_citation: import_v42.z.object({
|
|
398
|
+
start_index: import_v42.z.number(),
|
|
399
|
+
end_index: import_v42.z.number(),
|
|
400
|
+
url: import_v42.z.string(),
|
|
401
|
+
title: import_v42.z.string()
|
|
402
|
+
})
|
|
399
403
|
})
|
|
400
404
|
).nullish()
|
|
401
405
|
}).nullish(),
|
|
@@ -849,8 +853,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
849
853
|
type: "source",
|
|
850
854
|
sourceType: "url",
|
|
851
855
|
id: (0, import_provider_utils5.generateId)(),
|
|
852
|
-
url: annotation.url,
|
|
853
|
-
title: annotation.title
|
|
856
|
+
url: annotation.url_citation.url,
|
|
857
|
+
title: annotation.url_citation.title
|
|
854
858
|
});
|
|
855
859
|
}
|
|
856
860
|
const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
|
|
@@ -1079,8 +1083,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
1079
1083
|
type: "source",
|
|
1080
1084
|
sourceType: "url",
|
|
1081
1085
|
id: (0, import_provider_utils5.generateId)(),
|
|
1082
|
-
url: annotation.url,
|
|
1083
|
-
title: annotation.title
|
|
1086
|
+
url: annotation.url_citation.url,
|
|
1087
|
+
title: annotation.url_citation.title
|
|
1084
1088
|
});
|
|
1085
1089
|
}
|
|
1086
1090
|
}
|