summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrolfwilms <rolf_wilms@hotmail.com>2024-05-25 23:52:24 +0200
committerGitHub <noreply@github.com>2024-05-26 05:52:24 +0800
commit569317728cf39f26d4ca3d58eae6cdc72754354e (patch)
tree7eef3dae50d7e40f35be5acb73c416ccb665ea91
parent5458150ed3203cf13b0371efa2c791ac696cee93 (diff)
downloadaichat-569317728cf39f26d4ca3d58eae6cdc72754354e.tar.gz
fix: bedrock issues (#544)
* Removed extraneous key [stream] for AWS Bedrock Claude models. * Reduceddefault AWS Bedrock llama-3 max_output_tokens to 2048 to align with API requirements. --------- Co-authored-by: Rolf Wilms <rwilms@csc.com>
-rw-r--r--models.yaml4
-rw-r--r--src/client/bedrock.rs1
2 files changed, 3 insertions, 2 deletions
diff --git a/models.yaml b/models.yaml
index 42f08d0..c306f1b 100644
--- a/models.yaml
+++ b/models.yaml
@@ -342,13 +342,13 @@
supports_vision: true
- name: meta.llama3-8b-instruct-v1:0
max_input_tokens: 8192
- max_output_tokens: 4096
+ max_output_tokens: 2048
pass_max_tokens: true
input_price: 0.4
output_price: 0.6
- name: meta.llama3-70b-instruct-v1:0
max_input_tokens: 8192
- max_output_tokens: 4096
+ max_output_tokens: 2048
pass_max_tokens: true
input_price: 2.65
output_price: 3.5
diff --git a/src/client/bedrock.rs b/src/client/bedrock.rs
index 59b8102..1f13c7f 100644
--- a/src/client/bedrock.rs
+++ b/src/client/bedrock.rs
@@ -217,6 +217,7 @@ fn build_body(data: SendData, model: &Model, model_category: &ModelCategory) ->
let mut body = claude_build_body(data, model)?;
if let Some(body_obj) = body.as_object_mut() {
body_obj.remove("model");
+ body_obj.remove("stream");
}
body["anthropic_version"] = "bedrock-2023-05-31".into();
Ok(body)