aws-bedrock-text-sink/kamelet.json

253 lines
15 KiB
JSON
Raw Normal View History

{
"apiVersion": "camel.apache.org/v1",
"kind": "Kamelet",
"metadata": {
"name": "aws-bedrock-text-sink",
"annotations": {
"camel.apache.org/kamelet.support.level": "Stable",
"camel.apache.org/catalog.version": "4.22.1",
"camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJMYXllciAxIiBpZD0iTGF5ZXJfMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQzMC40MiwxOTYuMzJjOC0xMS4zOSwyMS4xNS0zOC4zMywwLTcyLjEzYTUyLjc5LDUyLjc5LDAsMCwwLTE3LjA2LTE3LjMxYy0xLjUzLTgtNy41NC0yNy4yNi0zMS40Mi00My45MUMzNTksNDcsMzI1LjUyLDQ5LjUzLDMxOS40NCw1MC4xNmE2NC4yNyw2NC4yNywwLDAsMC0xNi4wNy0yLjk0Yy0xNy4xNy0uODEtMzAuMzcsMy44OS0zOS43OCwxNC4wNUE0Ni4zLDQ2LjMsMCwwLDAsMjU2LDcyLjg5YTQ2LjA2LDQ2LjA2LDAsMCwwLTcuNi0xMS42MmMtOS40LTEwLjE2LTIyLjg2LTE0Ljg2LTM5Ljc2LTE0LjA1YTY0LjczLDY0LjczLDAsMCwwLTE2LjA3LDIuOTRDMTg2LjUyLDQ5LjUzLDE1Myw0NywxMzAsNjNjLTIzLjksMTYuNjYtMjkuOTEsMzYtMzEuNDMsNDMuOTJhNTIuOSw1Mi45LDAsMCwwLTE3LDE3LjNjLTIxLjEzLDMzLjgtNy45NCw2MC43NCwwLDcyLjE0LTkuNzUsOC4zNC0yNy44OCwyNy44OC0yMy4wNiw1NC42NiwzLjI4LDE4LjIsMTMuODQsMzIuMTksMjguNjgsMzguNjIsNS4yNiw0LjI3LDMzLjczLDI0L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elet.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 text model of Amazon Bedrock.",
"required": [
"modelId",
"region"
],
"type": "object",
"properties": {
"modelId": {
"title": "Model Id",
"description": "The model Id to be used.",
"type": "string",
"enum": [
"amazon.titan-text-express-v1",
"amazon.titan-text-lite-v1",
"ai21.j2-ultra-v1",
"ai21.j2-mid-v1",
"anthropic.claude-instant-v1",
"anthropic.claude-v2",
"anthropic.claude-v2:1",
"anthropic.claude-3-sonnet-20240229-v1:0"
]
},
"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",
"ap-southeast-1",
"ap-northeast-1",
"eu-central-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
},
"useProfileCredentialsProvider": {
"title": "Profile Credentials Provider",
"description": "Set whether the Bedrock client should expect to load credentials through a profile credentials provider.",
"type": "boolean",
"default": false
},
"useSessionCredentials": {
"title": "Session Credentials",
"description": "Set whether the Bedrock client should expect to use Session Credentials. This is useful in situation in which the user needs to assume a IAM role for doing operations in Bedrock.",
"type": "boolean",
"default": false
},
"profileCredentialsName": {
"title": "Profile Credentials Name",
"description": "If using a profile credentials provider this parameter sets the profile name.",
"type": "string"
},
"sessionToken": {
"title": "Session Token",
"description": "Amazon AWS Session Token used when the user needs to assume a IAM role.",
"type": "string",
"format": "password",
"x-descriptors": [
"urn:camel:group:credentials"
]
},
"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": [
{
"setHeader": {
"name": "CamelAwsBedrockContentType",
"constant": "application/json"
}
},
{
"setHeader": {
"name": "CamelAwsBedrockAcceptContentType",
"constant": "application/json"
}
},
{
"to": {
"uri": "aws-bedrock:bedrock-text",
"parameters": {
"secretKey": "{{?secretKey}}",
"accessKey": "{{?accessKey}}",
"region": "{{region}}",
"modelId": "{{modelId}}",
"operation": "invokeTextModel",
"useDefaultCredentialsProvider": "{{useDefaultCredentialsProvider}}",
"useProfileCredentialsProvider": "{{useProfileCredentialsProvider}}",
"useSessionCredentials": "{{useSessionCredentials}}",
"uriEndpointOverride": "{{?uriEndpointOverride}}",
"profileCredentialsName": "{{?profileCredentialsName}}",
"sessionToken": "{{?sessionToken}}",
"overrideEndpoint": "{{overrideEndpoint}}"
}
}
}
]
}
}
},
"propertiesSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "AWS Bedrock Text Sink",
"description": "Send data for invoking a text model of Amazon Bedrock.",
"required": [
"modelId",
"region"
],
"properties": {
"modelId": {
"type": "string",
"title": "Model Id",
"description": "The model Id to be used.",
"enum": [
"amazon.titan-text-express-v1",
"amazon.titan-text-lite-v1",
"ai21.j2-ultra-v1",
"ai21.j2-mid-v1",
"anthropic.claude-instant-v1",
"anthropic.claude-v2",
"anthropic.claude-v2:1",
"anthropic.claude-3-sonnet-20240229-v1:0"
]
},
"accessKey": {
"type": "string",
"title": "Access Key",
"description": "The access key obtained from AWS.",
"format": "password"
},
"secretKey": {
"type": "string",
"title": "Secret Key",
"description": "The secret key obtained from AWS.",
"format": "password"
},
"region": {
"type": "string",
"title": "AWS Region",
"description": "The AWS region to access.",
"enum": [
"us-east-1",
"us-west-1",
"ap-southeast-1",
"ap-northeast-1",
"eu-central-1"
]
},
"useDefaultCredentialsProvider": {
"type": "boolean",
"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).",
"default": false
},
"useProfileCredentialsProvider": {
"type": "boolean",
"title": "Profile Credentials Provider",
"description": "Set whether the Bedrock client should expect to load credentials through a profile credentials provider.",
"default": false
},
"useSessionCredentials": {
"type": "boolean",
"title": "Session Credentials",
"description": "Set whether the Bedrock client should expect to use Session Credentials. This is useful in situation in which the user needs to assume a IAM role for doing operations in Bedrock.",
"default": false
},
"profileCredentialsName": {
"type": "string",
"title": "Profile Credentials Name",
"description": "If using a profile credentials provider this parameter sets the profile name."
},
"sessionToken": {
"type": "string",
"title": "Session Token",
"description": "Amazon AWS Session Token used when the user needs to assume a IAM role.",
"format": "password"
},
"uriEndpointOverride": {
"type": "string",
"title": "Overwrite Endpoint URI",
"description": "The overriding endpoint URI. To use this option, you must also select the `overrideEndpoint` option."
},
"overrideEndpoint": {
"type": "boolean",
"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.",
"default": false
}
}
}
}