This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch bedrock-agent-runtime-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 3200154c9fa7e329c3d6422c337bf171ce723468
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Thu Apr 4 06:54:34 2024 +0200

    Support Camel AWS Bedrock Agent Runtime as Sink
    
    Signed-off-by: Andrea Cosentino <anco...@gmail.com>
---
 .../aws-bedrock-agent-runtime-sink.kamelet.yaml    | 107 +++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
new file mode 100644
index 00000000..30f54401
--- /dev/null
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
@@ -0,0 +1,107 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+  name: aws-bedrock-agent-runtime-sink
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.6.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJMYXllciAxIiBpZD0iTGF5ZXJfMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQzMC40MiwxOTYuMzJjOC0xMS4zOSwyMS4xNS0zOC4zMywwLTcyLjEzYTUyLjc5LDUyLjc5LDAsMCwwLTE3LjA2LTE3LjMxYy0xLjUzLTgtNy41NC0yNy4yNi0zMS40Mi00My45MUMzNTksNDcsMzI1LjUyLDQ5LjUzLDMxOS40NCw1MC4xNmE2NC4yNyw2NC4yNywwLDAsMC0xNi4wNy0yLjk0Yy0xNy4xNy0uODEtMzAuMzcsMy44OS0zOS43OCwxNC
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "AWS Bedrock"
+    camel.apache.org/kamelet.namespace: "AWS"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "AWS Bedrock Text Sink"
+    description: |-
+      Send data for invoking a knowledge base from AWS Bedrock.
+
+      The basic authentication method for the Bedrock service is to specify an 
access key and a secret key. These parameters are optional because the Kamelet 
provides a default credentials provider.
+
+      If you use the default credentials provider, the Bedrock client loads 
the credentials through this provider and doesn't use the basic authentication 
method.
+    required:
+      - modelId
+      - knowledgeBaseId
+      - region
+    type: object
+    properties:
+      modelId:
+        title: Model Id
+        description: The model Id to be used to generate responses.
+        type: string
+        enum: ["anthropic.claude-instant-v1", "anthropic.claude-v2", 
"anthropic.claude-v2:1", "anthropic.claude-3-sonnet-20240229-v1:0"]
+      knowledgeBaseId:
+        title: Knowledge Base Id
+        description: The Knowledge Base Id to be used to retrieve and generate 
responses.
+        type: string
+      accessKey:
+        title: Access Key
+        description: The access key obtained from AWS.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:camel:group:credentials
+      secretKey:
+        title: Secret Key
+        description: The secret key obtained from AWS.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:camel:group:credentials
+      region:
+        title: AWS Region
+        description: The AWS region to access.
+        type: string
+        enum: ["us-east-1", "us-west-1"]
+      useDefaultCredentialsProvider:
+        title: Default Credentials Provider
+        description: If true, the Bedrock client loads credentials through a 
default credentials provider. If false, it uses the basic authentication method 
(access key and secret key).
+        type: boolean
+        default: false
+      uriEndpointOverride:
+        title: Overwrite Endpoint URI
+        description: The overriding endpoint URI. To use this option, you must 
also select the `overrideEndpoint` option.
+        type: string
+      overrideEndpoint:
+        title: Endpoint Overwrite
+        description: Select this option to override the endpoint URI. To use 
this option, you must also provide a URI for the `uriEndpointOverride` option.
+        type: boolean
+        default: false
+  dependencies:
+    - "camel:core"
+    - "camel:aws-bedrock"
+    - "camel:kamelet"
+  template:
+    from:
+      uri: "kamelet:source"
+      steps:      
+      - to:
+          uri: "aws-bedrock-agent-runtime:bedrock-knowledge"
+          parameters:
+            secretKey: "{{?secretKey}}"
+            accessKey: "{{?accessKey}}"
+            region: "{{region}}"
+            modelId: "{{modelId}}"
+            knowledgeBaseId: "{{knowledgeBaseId}}"
+            operation: retrieveAndGenerate
+            useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
+            uriEndpointOverride: "{{?uriEndpointOverride}}"
+            overrideEndpoint: "{{overrideEndpoint}}"

Reply via email to