This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-20562-8x7b-mistral in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6b7d0edfd6b3b38e06ebbd9123f82a406168c82a Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Fri Apr 5 06:54:16 2024 +0200 CAMEL-20562 - Camel-AWS-Bedrock: Support Mistral AI models - Mistral 8x7B Instruct Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../runtime/integration/BedrockProducerIT.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/runtime/integration/BedrockProducerIT.java b/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/runtime/integration/BedrockProducerIT.java index 7645771da1c..56908f2ed4c 100644 --- a/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/runtime/integration/BedrockProducerIT.java +++ b/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/runtime/integration/BedrockProducerIT.java @@ -32,10 +32,10 @@ import org.junit.jupiter.api.condition.EnabledIfSystemProperties; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; // Must be manually tested. Provide your own accessKey and secretKey using -Daws.manual.access.key and -Daws.manual.secret.key -/*@EnabledIfSystemProperties({ +@EnabledIfSystemProperties({ @EnabledIfSystemProperty(named = "aws.manual.access.key", matches = ".*", disabledReason = "Access key not provided"), @EnabledIfSystemProperty(named = "aws.manual.secret.key", matches = ".*", disabledReason = "Secret key not provided") -})*/ +}) @TestInstance(TestInstance.Lifecycle.PER_CLASS) class BedrockProducerIT extends CamelTestSupport { @@ -426,17 +426,17 @@ class BedrockProducerIT extends CamelTestSupport { @Override public void configure() { from("direct:send_titan_express") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=eu-central-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=eu-central-1&operation=invokeTextModel&modelId=" + BedrockModels.TITAN_TEXT_EXPRESS_V1.model) .to(result); from("direct:send_titan_lite") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.TITAN_TEXT_LITE_V1.model) .to(result); from("direct:send_titan_image") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeImageModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeImageModel&modelId=" + BedrockModels.TITAN_IMAGE_GENERATOR_V1.model) .split(body()) .unmarshal().base64() @@ -444,12 +444,12 @@ class BedrockProducerIT extends CamelTestSupport { .to(result); from("direct:send_titan_embeddings") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeEmbeddingsModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeEmbeddingsModel&modelId=" + BedrockModels.TITAN_EMBEDDINGS_G1.model) .to(result); from("direct:send_jurassic2_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.JURASSIC2_ULTRA.model) .split(body()) .transform().jq(".data.text") @@ -457,7 +457,7 @@ class BedrockProducerIT extends CamelTestSupport { .to(result); from("direct:send_jurassic2_mid_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.JURASSIC2_MID.model) .split(body()) .transform().jq(".data.text") @@ -465,43 +465,43 @@ class BedrockProducerIT extends CamelTestSupport { .to(result); from("direct:send_anthropic_v1_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.ANTROPHIC_CLAUDE_INSTANT_V1.model) .log("${body}") .to(result); from("direct:send_anthropic_v2_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.ANTROPHIC_CLAUDE_V2.model) .log("${body}") .to(result); from("direct:send_anthropic_v21_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.ANTROPHIC_CLAUDE_V2_1.model) .log("${body}") .to(result); from("direct:send_anthropic_v3_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.ANTROPHIC_CLAUDE_V3.model) .log("Completions: ${body}") .to(result); from("direct:send_anthropic_v3_haiku_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.ANTROPHIC_CLAUDE_HAIKU_V3.model) .log("Completions: ${body}") .to(result); from("direct:send_mistral_7b_instruct_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.MISTRAL_7B_INSTRUCT.model) .log("Completions: ${body}") .to(result); from("direct:send_mistral_8x7b_instruct_model") - .to("aws-bedrock:label?useDefaultCredentialsProvider=true®ion=us-east-1&operation=invokeTextModel&modelId=" + .to("aws-bedrock:label?accessKey=RAW({{aws.manual.access.key}})&secretKey=RAW({{aws.manual.secret.key}}®ion=us-east-1&operation=invokeTextModel&modelId=" + BedrockModels.MISTRAL_8x7B_INSTRUCT.model) .log("Completions: ${body}") .to(result);