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>
pull/547/head
rolfwilms 1 month ago committed by GitHub
parent 5458150ed3
commit 569317728c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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

@ -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)

Loading…
Cancel
Save