This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9f8ab951367b6b818e5339b38a92588f07dcaa21 Author: Andrea Cosentino <[email protected]> AuthorDate: Thu Mar 14 10:50:31 2024 +0100 Camel-AWS-Bedrock: Add documentation for Anthropic Claude 1.2 Signed-off-by: Andrea Cosentino <[email protected]> --- .../src/main/docs/aws-bedrock-component.adoc | 50 ++++++++++++++++++++++ .../runtime/integration/BedrockProducerIT.java | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-component.adoc b/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-component.adoc index 23ab976cf9d..d2b5240c1a0 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-component.adoc +++ b/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-component.adoc @@ -405,6 +405,56 @@ Json schema for request } -------------------------------------------------------------------------------- +- Claude Instant V1.2 with id `anthropic.claude-instant-v1` +A fast, affordable yet still very capable model, which can handle a range of tasks including casual dialogue, text analysis, summarization, and document question-answering. + +Json schema for request + +[source,json] +-------------------------------------------------------------------------------- +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "prompt": { + "type": "string" + }, + "max_tokens_to_sample": { + "type": "integer" + }, + "stop_sequences": { + "type": "array", + "items": [ + { + "type": "string" + } + ] + }, + "temperature": { + "type": "number" + }, + "top_p": { + "type": "integer" + }, + "top_k": { + "type": "integer" + }, + "anthropic_version": { + "type": "string" + } + }, + "required": [ + "prompt", + "max_tokens_to_sample", + "stop_sequences", + "temperature", + "top_p", + "top_k", + "anthropic_version" + ] +} +-------------------------------------------------------------------------------- + === Bedrock Producer operations Camel-AWS Bedrock component provides the following operation on the producer side: 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 adb4a1a2538..26db6ffbb56 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 @@ -235,7 +235,7 @@ class BedrockProducerIT extends CamelTestSupport { rootNode.putIfAbsent("top_p", new IntNode(1)); rootNode.putIfAbsent("top_k", new IntNode(250)); rootNode.putIfAbsent("anthropic_version", new TextNode("bedrock-2023-05-31")); - + exchange.getMessage().setBody(mapper.writer().writeValueAsString(rootNode)); exchange.getMessage().setHeader(BedrockConstants.MODEL_CONTENT_TYPE, "application/json"); exchange.getMessage().setHeader(BedrockConstants.MODEL_ACCEPT_CONTENT_TYPE, "application/json");
