bedrock-wrapper 2.0.0 → 2.1.2

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
@@ -2,6 +2,10 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [2.1.0] - 2024-11-21 (Claude 3.5 Haiku)
6
+ ### Added
7
+ - Support for Claude 3.5 Haiku
8
+
5
9
  ## [2.0.0] - 2024-10-31 (Claude Sonnet & Haiku)
6
10
  ### Added
7
11
  - Support for Anthropic Sonnet & Haiku models
package/README.md CHANGED
@@ -95,6 +95,7 @@ Bedrock Wrapper is an npm package that simplifies the integration of existing Op
95
95
  |----------------------|-------------------------------------------|
96
96
  | Claude-3-5-Sonnet-v2 | anthropic.claude-3-5-sonnet-20241022-v2:0 |
97
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 |
98
99
  | Claude-3-Haiku | anthropic.claude-3-haiku-20240307-v1:0 |
99
100
  | Llama-3-2-1b | us.meta.llama3-2-1b-instruct-v1:0 |
100
101
  | Llama-3-2-3b | us.meta.llama3-2-3b-instruct-v1:0 |
package/bedrock-models.js CHANGED
@@ -40,6 +40,23 @@ export const bedrock_models = [
40
40
  "anthropic_version": "bedrock-2023-05-31"
41
41
  }
42
42
  },
43
+ {
44
+ // ======================
45
+ // == Claude 3.5 Haiku ==
46
+ // ======================
47
+ "modelName": "Claude-3-5-Haiku",
48
+ "modelId": "anthropic.claude-3-5-haiku-20241022-v1:0",
49
+ "messages_api": true,
50
+ "system_as_separate_field": true,
51
+ "display_role_names": true,
52
+ "max_tokens_param_name": "max_tokens",
53
+ "max_supported_response_tokens": 8192,
54
+ "response_chunk_element": "delta.text",
55
+ "response_nonchunk_element": "content[0].text",
56
+ "special_request_schema": {
57
+ "anthropic_version": "bedrock-2023-05-31"
58
+ }
59
+ },
43
60
  {
44
61
  // ====================
45
62
  // == Claude 3 Haiku ==
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "bedrock-wrapper",
3
- "version": "2.0.0",
3
+ "version": "2.1.2",
4
4
  "description": "🪨 Bedrock Wrapper is an npm package that simplifies the integration of existing OpenAI-compatible API objects with AWS Bedrock's serverless inference LLMs.",
5
+ "homepage": "https://www.equilllabs.com/projects/bedrock-wrapper.html",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "https://github.com/jparkerweb/bedrock-wrapper.git"
8
9
  },
10
+ "bugs": {
11
+ "url": "https://github.com/jparkerweb/bedrock-wrapper/issues",
12
+ "email": "equilllabs@gmail.com"
13
+ },
9
14
  "main": "bedrock-wrapper.js",
10
15
  "type": "module",
11
16
  "keywords": [
@@ -21,7 +26,10 @@
21
26
  "author": "",
22
27
  "license": "ISC",
23
28
  "dependencies": {
24
- "@aws-sdk/client-bedrock-runtime": "^3.682.0",
29
+ "@aws-sdk/client-bedrock-runtime": "^3.699.0",
25
30
  "dotenv": "^16.4.5"
31
+ },
32
+ "devDependencies": {
33
+ "chalk": "^5.3.0"
26
34
  }
27
35
  }
@@ -1,7 +1,7 @@
1
1
  Test Question: "Respond with exactly one word: What is 1+1?"
2
2
  ==================================================
3
3
 
4
- Starting tests with 15 models...
4
+ Starting tests with 16 models...
5
5
  Each model will be tested with streaming and non-streaming calls
6
6
 
7
7
 
@@ -15,6 +15,11 @@ Testing Claude-3-5-Sonnet ⇢
15
15
  Streaming test passed for Claude-3-5-Sonnet: "Two"
16
16
  Non-streaming test passed for Claude-3-5-Sonnet: "Two"
17
17
 
18
+ --------------------------------------------------
19
+ Testing Claude-3-5-Haiku ⇢
20
+ Streaming test passed for Claude-3-5-Haiku: "Two"
21
+ Non-streaming test passed for Claude-3-5-Haiku: "Two"
22
+
18
23
  --------------------------------------------------
19
24
  Testing Claude-3-Haiku ⇢
20
25
  Streaming test passed for Claude-3-Haiku: "Two."
@@ -52,7 +57,7 @@ Non-streaming test passed for Llama-3-1-70b: "Two."
52
57
 
53
58
  --------------------------------------------------
54
59
  Testing Llama-3-1-405b ⇢
55
- Streaming test passed for Llama-3-1-405b: "Two"
60
+ Streaming test passed for Llama-3-1-405b: "Two."
56
61
  Non-streaming test passed for Llama-3-1-405b: "Two."
57
62
 
58
63
  --------------------------------------------------
@@ -67,7 +72,7 @@ Non-streaming test passed for Llama-3-70b: "Two"
67
72
 
68
73
  --------------------------------------------------
69
74
  Testing Mistral-7b ⇢
70
- Streaming test passed for Mistral-7b: "Two. (I've given you two words, but the first one was "What" which was not part of the mathematical equation.)"
75
+ Streaming test passed for Mistral-7b: "Two. (I've given you two words, but the first one was "What" which was not part of the mathematical expression.)"
71
76
  Non-streaming test passed for Mistral-7b: "Two. (I've given you two words, but the first one was "What" which was not part of the mathematical equation.)"
72
77
 
73
78
  --------------------------------------------------
@@ -77,7 +82,7 @@ Streaming test passed for Mixtral-8x7b: "Two.
77
82
  The word you are looking for is "two." The sum of 1 + 1 is equal to 2. I am programmed to provide accurate and helpful responses, so I wanted to make sure that I gave you the correct answer. If you have any other questions or need further clarification, please don't hesitate to ask. I'm here to help!"
78
83
  Non-streaming test passed for Mixtral-8x7b: "Two.
79
84
 
80
- The word you are looking for is "two." The sum of 1 + 1 is equal to 2. I am programmed to provide accurate and helpful responses, so I wanted to make sure that I gave you the correct answer. If you have any other questions or need further clarification, please don't hesitate to ask. I'm here to help!"
85
+ The question you asked is a simple arithmetic addition problem, and the answer is 2. It is considered good manners to respond to a direct question with a straightforward and accurate answer. However, I noticed that you initially asked for a one-word response, so I included only the word "Two" in my answer. I hope this is what you were looking for! Is there anything else I can help you with?"
81
86
 
82
87
  --------------------------------------------------
83
88
  Testing Mistral-Large ⇢
@@ -1,15 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: jparkerweb
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
- polar: # Replace with a single Polar username
13
- buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14
- thanks_dev: # Replace with a single thanks.dev username
15
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']