You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/03/14 10:13:00 UTC
(camel) 03/07: Camel-AWS-Bedrock: Add documentation for Jurassic2-Mid model
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch bedrock-docs
in repository https://gitbox.apache.org/repos/asf/camel.git
commit c84a069f33266de02706a779b3f8aa388e68c8ef
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Mar 14 10:43:39 2024 +0100
Camel-AWS-Bedrock: Add documentation for Jurassic2-Mid model
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../src/main/docs/aws-bedrock-component.adoc | 66 ++++++++++++++++++++++
.../runtime/integration/BedrockProducerIT.java | 2 -
2 files changed, 66 insertions(+), 2 deletions(-)
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 8ecc15a9b72..23ab976cf9d 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
@@ -339,6 +339,72 @@ Json schema for request
}
--------------------------------------------------------------------------------
+- Jurassic2-Mid with id `ai21.j2-mid-v1`
+Jurassic-2 Mid is less powerful than Ultra, yet carefully designed to strike the right balance between exceptional quality and affordability.
+
+Json schema for request
+
+[source,json]
+--------------------------------------------------------------------------------
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "prompt": {
+ "type": "string"
+ },
+ "maxTokens": {
+ "type": "integer"
+ },
+ "temperature": {
+ "type": "integer"
+ },
+ "topP": {
+ "type": "integer"
+ },
+ "stopSequences": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "presencePenalty": {
+ "type": "object",
+ "properties": {
+ "scale": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "scale"
+ ]
+ },
+ "frequencyPenalty": {
+ "type": "object",
+ "properties": {
+ "scale": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "scale"
+ ]
+ }
+ },
+ "required": [
+ "prompt",
+ "maxTokens",
+ "temperature",
+ "topP",
+ "stopSequences",
+ "presencePenalty",
+ "frequencyPenalty"
+ ]
+}
+--------------------------------------------------------------------------------
+
=== 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 27408832610..adb4a1a2538 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
@@ -175,8 +175,6 @@ class BedrockProducerIT extends CamelTestSupport {
rootNode.putIfAbsent("presencePenalty", childNode);
rootNode.putIfAbsent("frequencyPenalty", childNode);
- System.out.println(mapper.writer().writeValueAsString(rootNode));
-
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");