From 250d2afbb63627359a7a1fb2c4d9847db7ac1e26 Mon Sep 17 00:00:00 2001 From: dafriz Date: Thu, 26 Sep 2024 19:18:26 +1000 Subject: [PATCH] Add Meta Llama 3.1, 3.2 instruct model enums This commit adds support for new Meta Llama 3.1 and 3.2 instruct models to the LlamaChatBedrockApi enum. It includes model IDs for: Llama 3.1: 8B, 70B, 405B Llama 3.2: 1B, 3B, 11B, 90B These additions allow users to specify the latest Llama models when using the Bedrock API. The commit also updates the class Javadoc with a link to AWS documentation for model IDs and bumps the @since version to 1.0.0. --- .../llama/api/LlamaChatBedrockApi.java | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java index df9d642a0..a476f70cf 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java @@ -35,10 +35,12 @@ import java.time.Duration; * Java client for the Bedrock Llama chat model. * https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-meta.html * + * Model IDs can be found here https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html + * * @author Christian Tzolov * @author Thomas Vitale * @author Wei Jiang - * @since 0.8.0 + * @since 1.0.0 */ public class LlamaChatBedrockApi extends AbstractBedrockApi { @@ -226,7 +228,42 @@ public class LlamaChatBedrockApi extends /** * meta.llama3-70b-instruct-v1:0 */ - LLAMA3_70B_INSTRUCT_V1("meta.llama3-70b-instruct-v1:0"); + LLAMA3_70B_INSTRUCT_V1("meta.llama3-70b-instruct-v1:0"), + + /** + * meta.llama3-1-8b-instruct-v1:0 + */ + LLAMA3_1_8B_INSTRUCT_V1("meta.llama3-1-8b-instruct-v1:0"), + + /** + * meta.llama3-1-70b-instruct-v1:0 + */ + LLAMA3_1_70B_INSTRUCT_V1("meta.llama3-1-70b-instruct-v1:0"), + + /** + * meta.llama3-1-405b-instruct-v1:0 + */ + LLAMA3_1_405B_INSTRUCT_V1("meta.llama3-1-405b-instruct-v1:0"), + + /** + * meta.llama3-2-1b-instruct-v1:0 + */ + LLAMA3_2_1B_INSTRUCT_V1("meta.llama3-2-1b-instruct-v1:0"), + + /** + * meta.llama3-2-3b-instruct-v1:0 + */ + LLAMA3_2_3B_INSTRUCT_V1("meta.llama3-2-3b-instruct-v1:0"), + + /** + * meta.llama3-2-11b-instruct-v1:0 + */ + LLAMA3_2_11B_INSTRUCT_V1("meta.llama3-2-11b-instruct-v1:0"), + + /** + * meta.llama3-2-90b-instruct-v1:0 + */ + LLAMA3_2_90B_INSTRUCT_V1("meta.llama3-2-90b-instruct-v1:0"); private final String id;