bedrock-wrapper 2.1.2 → 2.3.0

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 CHANGED
@@ -1,6 +1,26 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [2.3.0] - 2025-02-15 (Claude 3.7 & Image Support)
5
+ ### Added
6
+ - Support for Claude 3.7 models
7
+ - Claude-3-7-Sonnet
8
+ - Claude-3-7-Sonnet-Thinking
9
+ - Image support for compatible Claude models
10
+ - Claude 3.5 Sonnet
11
+ - Claude 3.5 Sonnet v2
12
+ - Claude 3.7 Sonnet
13
+ - Claude 3.7 Sonnet Thinking
14
+ - Enhanced message handling for multimodal content
15
+ - Documentation for image support usage
16
+
17
+ ### Changed
18
+ - Updated model configuration for image-capable models
19
+ - Improved response handling for multimodal inputs
20
+
21
+ ## [2.2.0] - 2025-01-01 (Llama 3.3 70b)
22
+ ### Added
23
+ - Support for Llama 3.3 70b
4
24
 
5
25
  ## [2.1.0] - 2024-11-21 (Claude 3.5 Haiku)
6
26
  ### Added
package/README.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # 🪨 Bedrock Wrapper
2
+
2
3
  Bedrock Wrapper is an npm package that simplifies the integration of existing OpenAI-compatible API objects with AWS Bedrock's serverless inference LLMs. Follow the steps below to integrate into your own application, or alternativly use the 🔀 [Bedrock Proxy Endpoint](https://github.com/jparkerweb/bedrock-proxy-endpoint) project to spin up your own custom OpenAI server endpoint for even easier inference (using the standard `baseUrl`, and `apiKey` params).
3
4
 
5
+ ![bedrock-wrapper](https://raw.githubusercontent.com/jparkerweb/bedrock-wrapper/refs/heads/main/docs/bedrock-wrapper.jpg)
6
+
7
+ ---
8
+
9
+ ### Maintained by
10
+ <a href="https://www.equilllabs.com">
11
+ <img src="https://raw.githubusercontent.com/jparkerweb/eQuill-Labs/refs/heads/main/src/static/images/logo-text-outline.png" alt="eQuill Labs" height="40">
12
+ </a>
13
+
4
14
  ---
5
15
 
6
16
  ### Install
@@ -55,7 +65,7 @@ Bedrock Wrapper is an npm package that simplifies the integration of existing Op
55
65
  ]
56
66
  ```
57
67
 
58
- ***the `model` value should be either a corresponding `modelName` or `modelId` for the supported `bedrock_models` (see the Supported Models section below)***
68
+ ***the `model` value should be the corresponding `modelName` value in the `bedrock_models` section below (see Supported Models below)***
59
69
 
60
70
  4. call the `bedrockWrapper` function and pass in the previously defined `awsCreds` and `openaiChatCompletionsCreateObject` objects
61
71
  ```javascript
@@ -91,25 +101,28 @@ Bedrock Wrapper is an npm package that simplifies the integration of existing Op
91
101
 
92
102
  ### Supported Models
93
103
 
94
- | modelName | modelId |
95
- |----------------------|-------------------------------------------|
96
- | Claude-3-5-Sonnet-v2 | anthropic.claude-3-5-sonnet-20241022-v2:0 |
97
- | Claude-3-5-Sonnet | anthropic.claude-3-5-sonnet-20240620-v1:0 |
98
- | Claude-3-5-Haiku | anthropic.claude-3-5-haiku-20241022-v1:0 |
99
- | Claude-3-Haiku | anthropic.claude-3-haiku-20240307-v1:0 |
100
- | Llama-3-2-1b | us.meta.llama3-2-1b-instruct-v1:0 |
101
- | Llama-3-2-3b | us.meta.llama3-2-3b-instruct-v1:0 |
102
- | Llama-3-2-11b | us.meta.llama3-2-11b-instruct-v1:0 |
103
- | Llama-3-2-90b | us.meta.llama3-2-90b-instruct-v1:0 |
104
- | Llama-3-1-8b | meta.llama3-1-8b-instruct-v1:0 |
105
- | Llama-3-1-70b | meta.llama3-1-70b-instruct-v1:0 |
106
- | Llama-3-1-405b | meta.llama3-1-405b-instruct-v1:0 |
107
- | Llama-3-8b | meta.llama3-8b-instruct-v1:0 |
108
- | Llama-3-70b | meta.llama3-70b-instruct-v1:0 |
109
- | Mistral-7b | mistral.mistral-7b-instruct-v0:2 |
110
- | Mixtral-8x7b | mistral.mixtral-8x7b-instruct-v0:1 |
111
- | Mistral-Large | mistral.mistral-large-2402-v1:0 |
112
-
104
+ | modelName | AWS Model Id | Image |
105
+ |----------------------------|----------------------------------------------|-------|
106
+ | Claude-3-7-Sonnet-Thinking | us.anthropic.claude-3-7-sonnet-20250219-v1:0 | ✅ |
107
+ | Claude-3-7-Sonnet | us.anthropic.claude-3-7-sonnet-20250219-v1:0 | ✅ |
108
+ | Claude-3-5-Sonnet-v2 | anthropic.claude-3-5-sonnet-20241022-v2:0 | |
109
+ | Claude-3-5-Sonnet | anthropic.claude-3-5-sonnet-20240620-v1:0 | ✅ |
110
+ | Claude-3-5-Haiku | anthropic.claude-3-5-haiku-20241022-v1:0 | ❌ |
111
+ | Claude-3-Haiku | anthropic.claude-3-haiku-20240307-v1:0 | ❌ |
112
+ | Llama-3-3-70b | us.meta.llama3-3-70b-instruct-v1:0 | ❌ |
113
+ | Llama-3-2-1b | us.meta.llama3-2-1b-instruct-v1:0 | ❌ |
114
+ | Llama-3-2-3b | us.meta.llama3-2-3b-instruct-v1:0 | ❌ |
115
+ | Llama-3-2-11b | us.meta.llama3-2-11b-instruct-v1:0 | ❌ |
116
+ | Llama-3-2-90b | us.meta.llama3-2-90b-instruct-v1:0 | ❌ |
117
+ | Llama-3-1-8b | meta.llama3-1-8b-instruct-v1:0 | ❌ |
118
+ | Llama-3-1-70b | meta.llama3-1-70b-instruct-v1:0 | ❌ |
119
+ | Llama-3-1-405b | meta.llama3-1-405b-instruct-v1:0 | ❌ |
120
+ | Llama-3-8b | meta.llama3-8b-instruct-v1:0 | ❌ |
121
+ | Llama-3-70b | meta.llama3-70b-instruct-v1:0 | ❌ |
122
+ | Mistral-7b | mistral.mistral-7b-instruct-v0:2 | ❌ |
123
+ | Mixtral-8x7b | mistral.mixtral-8x7b-instruct-v0:1 | ❌ |
124
+ | Mistral-Large | mistral.mistral-large-2402-v1:0 | ❌ |
125
+
113
126
  To return the list progrmatically you can import and call `listBedrockWrapperSupportedModels`:
114
127
  ```javascript
115
128
  import { listBedrockWrapperSupportedModels } from 'bedrock-wrapper';
@@ -121,6 +134,54 @@ Please modify the `bedrock_models.js` file and submit a PR 🏆 or create an Iss
121
134
 
122
135
  ---
123
136
 
137
+ ### Image Support
138
+
139
+ For models with image support (Claude 3.5 Sonnet, Claude 3.7 Sonnet, and Claude 3.7 Sonnet Thinking), you can include images in your messages using the following format:
140
+
141
+ ```javascript
142
+ messages = [
143
+ {
144
+ role: "system",
145
+ content: "You are a helpful AI assistant that can analyze images.",
146
+ },
147
+ {
148
+ role: "user",
149
+ content: [
150
+ { type: "text", text: "What's in this image?" },
151
+ {
152
+ type: "image_url",
153
+ image_url: {
154
+ url: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..." // base64 encoded image
155
+ }
156
+ }
157
+ ]
158
+ }
159
+ ]
160
+ ```
161
+
162
+ You can also use a direct URL to an image instead of base64 encoding:
163
+
164
+ ```javascript
165
+ messages = [
166
+ {
167
+ role: "user",
168
+ content: [
169
+ { type: "text", text: "Describe this image in detail." },
170
+ {
171
+ type: "image_url",
172
+ image_url: {
173
+ url: "https://example.com/path/to/image.jpg" // direct URL to image
174
+ }
175
+ }
176
+ ]
177
+ }
178
+ ]
179
+ ```
180
+
181
+ You can include multiple images in a single message by adding more image_url objects to the content array.
182
+
183
+ ---
184
+
124
185
  ### 📢 P.S.
125
186
 
126
187
  In case you missed it at the beginning of this doc, for an even easier setup, use the 🔀 [Bedrock Proxy Endpoint](https://github.com/jparkerweb/bedrock-proxy-endpoint) project to spin up your own custom OpenAI server endpoint (using the standard `baseUrl`, and `apiKey` params).