@ai-sdk/amazon-bedrock 4.0.0-beta.31 → 4.0.0-beta.33
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 +20 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "@ai-sdk/provider-utils";
|
|
9
9
|
|
|
10
10
|
// src/version.ts
|
|
11
|
-
var VERSION = true ? "4.0.0-beta.
|
|
11
|
+
var VERSION = true ? "4.0.0-beta.33" : "0.0.0-test";
|
|
12
12
|
|
|
13
13
|
// src/bedrock-provider.ts
|
|
14
14
|
import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
|
|
@@ -419,7 +419,7 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
419
419
|
switch (contentPart.type) {
|
|
420
420
|
case "text":
|
|
421
421
|
return { text: contentPart.text };
|
|
422
|
-
case "
|
|
422
|
+
case "image-data":
|
|
423
423
|
if (!contentPart.mediaType.startsWith("image/")) {
|
|
424
424
|
throw new UnsupportedFunctionalityError2({
|
|
425
425
|
functionality: `media type: ${contentPart.mediaType}`
|
|
@@ -434,6 +434,11 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
434
434
|
source: { bytes: contentPart.data }
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
|
+
default: {
|
|
438
|
+
throw new UnsupportedFunctionalityError2({
|
|
439
|
+
functionality: `unsupported tool content part type: ${contentPart.type}`
|
|
440
|
+
});
|
|
441
|
+
}
|
|
437
442
|
}
|
|
438
443
|
});
|
|
439
444
|
break;
|