ai 5.0.258 → 5.0.260
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 +15 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -727,7 +727,7 @@ import {
|
|
|
727
727
|
} from "@ai-sdk/provider-utils";
|
|
728
728
|
|
|
729
729
|
// src/version.ts
|
|
730
|
-
var VERSION = true ? "5.0.
|
|
730
|
+
var VERSION = true ? "5.0.260" : "0.0.0-test";
|
|
731
731
|
|
|
732
732
|
// src/util/download/download.ts
|
|
733
733
|
var download = async ({
|
|
@@ -6466,6 +6466,12 @@ async function embed({
|
|
|
6466
6466
|
}
|
|
6467
6467
|
})
|
|
6468
6468
|
);
|
|
6469
|
+
if (embedding2 == null) {
|
|
6470
|
+
throw new InvalidResponseDataError({
|
|
6471
|
+
data: modelResponse.embeddings,
|
|
6472
|
+
message: "No embedding generated."
|
|
6473
|
+
});
|
|
6474
|
+
}
|
|
6469
6475
|
return {
|
|
6470
6476
|
embedding: embedding2,
|
|
6471
6477
|
usage: usage2,
|
|
@@ -8931,7 +8937,11 @@ function simulateStreamingMiddleware() {
|
|
|
8931
8937
|
switch (part.type) {
|
|
8932
8938
|
case "text": {
|
|
8933
8939
|
if (part.text.length > 0) {
|
|
8934
|
-
controller.enqueue({
|
|
8940
|
+
controller.enqueue({
|
|
8941
|
+
type: "text-start",
|
|
8942
|
+
id: String(id),
|
|
8943
|
+
...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}
|
|
8944
|
+
});
|
|
8935
8945
|
controller.enqueue({
|
|
8936
8946
|
type: "text-delta",
|
|
8937
8947
|
id: String(id),
|