@activepieces/piece-amazon-bedrock 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ {
2
+ "Build generative AI applications with foundation models": "Build generative AI applications with foundation models",
3
+ "Access Key ID": "Access Key ID",
4
+ "Secret Access Key": "Secret Access Key",
5
+ "Region": "Region",
6
+ "US East (N. Virginia) [us-east-1]": "US East (N. Virginia) [us-east-1]",
7
+ "US East (Ohio) [us-east-2]": "US East (Ohio) [us-east-2]",
8
+ "US West (Oregon) [us-west-2]": "US West (Oregon) [us-west-2]",
9
+ "Asia Pacific (Hyderabad) [ap-south-2]": "Asia Pacific (Hyderabad) [ap-south-2]",
10
+ "Asia Pacific (Mumbai) [ap-south-1]": "Asia Pacific (Mumbai) [ap-south-1]",
11
+ "Asia Pacific (Osaka) [ap-northeast-3]": "Asia Pacific (Osaka) [ap-northeast-3]",
12
+ "Asia Pacific (Seoul) [ap-northeast-2]": "Asia Pacific (Seoul) [ap-northeast-2]",
13
+ "Asia Pacific (Singapore) [ap-southeast-1]": "Asia Pacific (Singapore) [ap-southeast-1]",
14
+ "Asia Pacific (Sydney) [ap-southeast-2]": "Asia Pacific (Sydney) [ap-southeast-2]",
15
+ "Asia Pacific (Tokyo) [ap-northeast-1]": "Asia Pacific (Tokyo) [ap-northeast-1]",
16
+ "Canada (Central) [ca-central-1]": "Canada (Central) [ca-central-1]",
17
+ "Europe (Frankfurt) [eu-central-1]": "Europe (Frankfurt) [eu-central-1]",
18
+ "Europe (Ireland) [eu-west-1]": "Europe (Ireland) [eu-west-1]",
19
+ "Europe (London) [eu-west-2]": "Europe (London) [eu-west-2]",
20
+ "Europe (Milan) [eu-south-1]": "Europe (Milan) [eu-south-1]",
21
+ "Europe (Paris) [eu-west-3]": "Europe (Paris) [eu-west-3]",
22
+ "Europe (Spain) [eu-south-2]": "Europe (Spain) [eu-south-2]",
23
+ "Europe (Stockholm) [eu-north-1]": "Europe (Stockholm) [eu-north-1]",
24
+ "Europe (Zurich) [eu-central-2]": "Europe (Zurich) [eu-central-2]",
25
+ "South America (São Paulo) [sa-east-1]": "South America (São Paulo) [sa-east-1]",
26
+ "AWS Bedrock authentication using Access Key and Secret Key.": "AWS Bedrock authentication using Access Key and Secret Key.",
27
+ "Ask Bedrock": "Ask Bedrock",
28
+ "Generate Content from Image": "Generate Content from Image",
29
+ "Generate Image": "Generate Image",
30
+ "Generate Embeddings": "Generate Embeddings",
31
+ "Send a text prompt to an Amazon Bedrock model.": "Send a text prompt to an Amazon Bedrock model.",
32
+ "Ask a Bedrock model a question about an image.": "Ask a Bedrock model a question about an image.",
33
+ "Generate an image from a text prompt using Amazon Titan Image Generator or Stability AI models.": "Generate an image from a text prompt using Amazon Titan Image Generator or Stability AI models.",
34
+ "Generate vector embeddings from text using Amazon Titan Embed, Cohere Embed, or Amazon Nova Multimodal Embeddings models.": "Generate vector embeddings from text using Amazon Titan Embed, Cohere Embed, or Amazon Nova Multimodal Embeddings models.",
35
+ "Model": "Model",
36
+ "Prompt": "Prompt",
37
+ "System Prompt": "System Prompt",
38
+ "Temperature": "Temperature",
39
+ "Maximum Tokens": "Maximum Tokens",
40
+ "Top P": "Top P",
41
+ "Stop Sequences": "Stop Sequences",
42
+ "Memory Key": "内存键",
43
+ "Image": "Image",
44
+ "Negative Prompt": "Negative Prompt",
45
+ "Width": "Width",
46
+ "Height": "Height",
47
+ "Seed": "Seed",
48
+ "Input Text": "Input Text",
49
+ "Embedding Purpose": "Embedding Purpose",
50
+ "Dimensions": "Dimensions",
51
+ "Normalize": "Normalize",
52
+ "The foundation model to use for generation.": "The foundation model to use for generation.",
53
+ "Instructions that guide the model behavior.": "Instructions that guide the model behavior.",
54
+ "Controls randomness. Lower values produce more deterministic output.": "Controls randomness. Lower values produce more deterministic output.",
55
+ "The maximum number of tokens to generate.": "The maximum number of tokens to generate.",
56
+ "Nucleus sampling: the model considers tokens with top_p probability mass.": "Nucleus sampling: the model considers tokens with top_p probability mass.",
57
+ "Sequences that will cause the model to stop generating. Up to 4 sequences.": "Sequences that will cause the model to stop generating. Up to 4 sequences.",
58
+ "A memory key that will keep the chat history shared across runs and flows. Keep it empty to leave the model without memory of previous messages.": "A memory key that will keep the chat history shared across runs and flows. Keep it empty to leave the model without memory of previous messages.",
59
+ "The foundation model to use. Must support image input.": "The foundation model to use. Must support image input.",
60
+ "The image to analyze (PNG, JPEG, GIF, or WebP).": "The image to analyze (PNG, JPEG, GIF, or WebP).",
61
+ "What do you want the model to tell you about the image?": "What do you want the model to tell you about the image?",
62
+ "The image generation model to use.": "The image generation model to use.",
63
+ "A text description of the image you want to generate.": "A text description of the image you want to generate.",
64
+ "Describe what you do NOT want in the image. Helps refine the output.": "Describe what you do NOT want in the image. Helps refine the output.",
65
+ "Image width in pixels. Must be supported by the model.": "Image width in pixels. Must be supported by the model.",
66
+ "Image height in pixels. Must be supported by the model.": "Image height in pixels. Must be supported by the model.",
67
+ "A seed for reproducible results. Use the same seed and prompt to get the same image.": "A seed for reproducible results. Use the same seed and prompt to get the same image.",
68
+ "The embedding model to use.": "The embedding model to use.",
69
+ "The text to generate embeddings for.": "The text to generate embeddings for.",
70
+ "Optimize embeddings for your use case. Only used by Nova Multimodal Embeddings.": "Optimize embeddings for your use case. Only used by Nova Multimodal Embeddings.",
71
+ "The number of dimensions for the output embedding vector. Titan Embed v2: 256, 512, 1024. Nova Multimodal: 256, 384, 1024, 3072.": "The number of dimensions for the output embedding vector. Titan Embed v2: 256, 512, 1024. Nova Multimodal: 256, 384, 1024, 3072.",
72
+ "Whether to normalize the output embedding vector. Supported by Titan Embed v2.": "Whether to normalize the output embedding vector. Supported by Titan Embed v2.",
73
+ "Generic Index": "Generic Index",
74
+ "Generic Retrieval": "Generic Retrieval",
75
+ "Text Retrieval": "Text Retrieval",
76
+ "Classification": "Classification",
77
+ "Clustering": "Clustering"
78
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export declare const awsBedrockAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>;
6
+ export declare const awsBedrock: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
+ }>>;
package/src/index.js ADDED
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.awsBedrock = exports.awsBedrockAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const client_bedrock_1 = require("@aws-sdk/client-bedrock");
8
+ const send_prompt_1 = require("./lib/actions/send-prompt");
9
+ const generate_content_from_image_1 = require("./lib/actions/generate-content-from-image");
10
+ const generate_image_1 = require("./lib/actions/generate-image");
11
+ const generate_embeddings_1 = require("./lib/actions/generate-embeddings");
12
+ const common_1 = require("./lib/common");
13
+ const custom_api_call_1 = require("./lib/actions/custom-api-call");
14
+ exports.awsBedrockAuth = pieces_framework_1.PieceAuth.CustomAuth({
15
+ description: 'AWS Bedrock authentication using Access Key and Secret Key.',
16
+ props: {
17
+ accessKeyId: pieces_framework_1.Property.ShortText({
18
+ displayName: 'Access Key ID',
19
+ required: true,
20
+ }),
21
+ secretAccessKey: pieces_framework_1.PieceAuth.SecretText({
22
+ displayName: 'Secret Access Key',
23
+ required: true,
24
+ }),
25
+ region: pieces_framework_1.Property.StaticDropdown({
26
+ displayName: 'Region',
27
+ required: true,
28
+ options: {
29
+ options: [
30
+ { label: 'US East (N. Virginia) [us-east-1]', value: 'us-east-1' },
31
+ { label: 'US East (Ohio) [us-east-2]', value: 'us-east-2' },
32
+ { label: 'US West (Oregon) [us-west-2]', value: 'us-west-2' },
33
+ {
34
+ label: 'Asia Pacific (Hyderabad) [ap-south-2]',
35
+ value: 'ap-south-2',
36
+ },
37
+ {
38
+ label: 'Asia Pacific (Mumbai) [ap-south-1]',
39
+ value: 'ap-south-1',
40
+ },
41
+ {
42
+ label: 'Asia Pacific (Osaka) [ap-northeast-3]',
43
+ value: 'ap-northeast-3',
44
+ },
45
+ {
46
+ label: 'Asia Pacific (Seoul) [ap-northeast-2]',
47
+ value: 'ap-northeast-2',
48
+ },
49
+ {
50
+ label: 'Asia Pacific (Singapore) [ap-southeast-1]',
51
+ value: 'ap-southeast-1',
52
+ },
53
+ {
54
+ label: 'Asia Pacific (Sydney) [ap-southeast-2]',
55
+ value: 'ap-southeast-2',
56
+ },
57
+ {
58
+ label: 'Asia Pacific (Tokyo) [ap-northeast-1]',
59
+ value: 'ap-northeast-1',
60
+ },
61
+ {
62
+ label: 'Canada (Central) [ca-central-1]',
63
+ value: 'ca-central-1',
64
+ },
65
+ {
66
+ label: 'Europe (Frankfurt) [eu-central-1]',
67
+ value: 'eu-central-1',
68
+ },
69
+ { label: 'Europe (Ireland) [eu-west-1]', value: 'eu-west-1' },
70
+ { label: 'Europe (London) [eu-west-2]', value: 'eu-west-2' },
71
+ { label: 'Europe (Milan) [eu-south-1]', value: 'eu-south-1' },
72
+ { label: 'Europe (Paris) [eu-west-3]', value: 'eu-west-3' },
73
+ { label: 'Europe (Spain) [eu-south-2]', value: 'eu-south-2' },
74
+ {
75
+ label: 'Europe (Stockholm) [eu-north-1]',
76
+ value: 'eu-north-1',
77
+ },
78
+ {
79
+ label: 'Europe (Zurich) [eu-central-2]',
80
+ value: 'eu-central-2',
81
+ },
82
+ {
83
+ label: 'South America (São Paulo) [sa-east-1]',
84
+ value: 'sa-east-1',
85
+ },
86
+ ],
87
+ },
88
+ }),
89
+ },
90
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
91
+ try {
92
+ const client = (0, common_1.createBedrockClient)(auth);
93
+ yield client.send(new client_bedrock_1.ListFoundationModelsCommand({}));
94
+ return { valid: true };
95
+ }
96
+ catch (e) {
97
+ return {
98
+ valid: false,
99
+ error: e === null || e === void 0 ? void 0 : e.message,
100
+ };
101
+ }
102
+ }),
103
+ required: true,
104
+ });
105
+ exports.awsBedrock = (0, pieces_framework_1.createPiece)({
106
+ displayName: 'AWS Bedrock',
107
+ description: 'Build generative AI applications with foundation models',
108
+ auth: exports.awsBedrockAuth,
109
+ minimumSupportedRelease: '0.36.1',
110
+ logoUrl: 'https://cdn.activepieces.com/pieces/amazon-bedrock.png',
111
+ categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
112
+ authors: ["onyedikachi-david"],
113
+ actions: [send_prompt_1.sendPrompt, generate_content_from_image_1.generateContentFromImage, generate_image_1.generateImage, generate_embeddings_1.generateEmbeddings, custom_api_call_1.customApiCall],
114
+ triggers: [],
115
+ });
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/amazon-bedrock/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,iDAAqD;AACrD,4DAAsE;AACtE,2DAAuD;AACvD,2FAAqF;AACrF,iEAA6D;AAC7D,2EAAuE;AACvE,yCAAmD;AACnD,mEAA8D;AAEjD,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,6DAA6D;IAC1E,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,4BAAS,CAAC,UAAU,CAAC;YACpC,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,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AA6B,EAAE,KAAK,EAAE,YAAY,EAAE;oBAC7D;wBACE,KAAK,EAAE,iCAAiC;wBACxC,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,KAAK,EAAE,gCAAgC;wBACvC,KAAK,EAAE,cAAc;qBACtB;oBACD;wBACE,KAAK,EAAE,uCAAuC;wBAC9C,KAAK,EAAE,WAAW;qBACnB;iBACF;aACF;SACF,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;YACzC,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,4CAA2B,CAAC,EAAE,CAAC,CAAC,CAAC;YACvD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAG,CAAW,aAAX,CAAC,uBAAD,CAAC,CAAY,OAAO;aAC7B,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,yDAAyD;IACtE,IAAI,EAAE,sBAAc;IACpB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,wDAAwD;IACjE,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,CAAC,mBAAmB,CAAC;IAC9B,OAAO,EAAE,CAAC,wBAAU,EAAE,sDAAwB,EAAE,8BAAa,EAAE,wCAAkB,EAAE,+BAAa,CAAC;IACjG,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { HttpMethod } from '@activepieces/pieces-common';
2
+ export declare const customApiCall: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
3
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
6
+ }>, {
7
+ service: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
8
+ method: import("@activepieces/pieces-framework").StaticDropdownProperty<HttpMethod, true>;
9
+ path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ headers: import("@activepieces/pieces-framework").ObjectProperty<false>;
11
+ queryParams: import("@activepieces/pieces-framework").ObjectProperty<false>;
12
+ body: import("@activepieces/pieces-framework").JsonProperty<false>;
13
+ failsafe: import("@activepieces/pieces-framework").CheckboxProperty<false>;
14
+ timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
15
+ }>;
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.customApiCall = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const index_1 = require("../../index");
8
+ const signature_v4_1 = require("@smithy/signature-v4");
9
+ const protocol_http_1 = require("@smithy/protocol-http");
10
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
11
+ const AWS_BEDROCK_SERVICES = [
12
+ { label: 'Bedrock (Control Plane)', value: 'bedrock' },
13
+ { label: 'Bedrock Runtime (Inference)', value: 'bedrock-runtime' },
14
+ { label: 'Bedrock Agent (Control Plane)', value: 'bedrock-agent' },
15
+ {
16
+ label: 'Bedrock Agent Runtime (Data Plane)',
17
+ value: 'bedrock-agent-runtime',
18
+ },
19
+ ];
20
+ function signAwsRequest(_a) {
21
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ accessKeyId, secretAccessKey, region, service, method, url, headers, body, }) {
22
+ const parsedUrl = new URL(url);
23
+ const awsRequest = new protocol_http_1.HttpRequest({
24
+ method,
25
+ protocol: parsedUrl.protocol,
26
+ hostname: parsedUrl.hostname,
27
+ port: parsedUrl.port ? Number(parsedUrl.port) : undefined,
28
+ path: parsedUrl.pathname,
29
+ query: Object.fromEntries(parsedUrl.searchParams.entries()),
30
+ headers: Object.assign(Object.assign({}, headers), { host: parsedUrl.hostname }),
31
+ body: body !== null && body !== void 0 ? body : undefined,
32
+ });
33
+ const signer = new signature_v4_1.SignatureV4({
34
+ credentials: {
35
+ accessKeyId,
36
+ secretAccessKey,
37
+ },
38
+ region,
39
+ service,
40
+ sha256: sha256_js_1.Sha256,
41
+ });
42
+ const signedRequest = yield signer.sign(awsRequest);
43
+ return {
44
+ headers: signedRequest.headers,
45
+ };
46
+ });
47
+ }
48
+ exports.customApiCall = (0, pieces_framework_1.createAction)({
49
+ name: 'custom_api_call',
50
+ displayName: 'Custom API Call',
51
+ description: 'Make a custom API call to any AWS Bedrock endpoint. Requests are automatically signed with AWS Signature V4.',
52
+ auth: index_1.awsBedrockAuth,
53
+ requireAuth: true,
54
+ props: {
55
+ service: pieces_framework_1.Property.StaticDropdown({
56
+ displayName: 'Service',
57
+ description: 'Select the AWS Bedrock service endpoint to call. Use "Bedrock" for control plane operations (e.g., ListFoundationModels) and "Bedrock Runtime" for inference operations (e.g., InvokeModel).',
58
+ required: true,
59
+ defaultValue: 'bedrock',
60
+ options: {
61
+ disabled: false,
62
+ options: AWS_BEDROCK_SERVICES,
63
+ },
64
+ }),
65
+ method: pieces_framework_1.Property.StaticDropdown({
66
+ displayName: 'Method',
67
+ required: true,
68
+ defaultValue: pieces_common_1.HttpMethod.GET,
69
+ options: {
70
+ disabled: false,
71
+ options: Object.values(pieces_common_1.HttpMethod).map((v) => ({
72
+ label: v,
73
+ value: v,
74
+ })),
75
+ },
76
+ }),
77
+ path: pieces_framework_1.Property.ShortText({
78
+ displayName: 'Path',
79
+ description: 'The API path (e.g., /foundation-models, /model/{modelId}/invoke). See the AWS Bedrock API Reference for available endpoints.',
80
+ required: true,
81
+ defaultValue: '/foundation-models',
82
+ }),
83
+ headers: pieces_framework_1.Property.Object({
84
+ displayName: 'Headers',
85
+ description: 'Additional headers to include. Authorization headers are automatically added via AWS Signature V4.',
86
+ required: false,
87
+ }),
88
+ queryParams: pieces_framework_1.Property.Object({
89
+ displayName: 'Query Parameters',
90
+ description: 'Query parameters to include in the request URL.',
91
+ required: false,
92
+ }),
93
+ body: pieces_framework_1.Property.Json({
94
+ displayName: 'Body',
95
+ description: 'JSON body for POST/PUT requests.',
96
+ required: false,
97
+ }),
98
+ failsafe: pieces_framework_1.Property.Checkbox({
99
+ displayName: 'No Error on Failure',
100
+ required: false,
101
+ defaultValue: false,
102
+ }),
103
+ timeout: pieces_framework_1.Property.Number({
104
+ displayName: 'Timeout (in seconds)',
105
+ required: false,
106
+ defaultValue: 30,
107
+ }),
108
+ },
109
+ run(context) {
110
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
111
+ var _a, _b, _c, _d, _e;
112
+ const { service, method, path, headers, queryParams, body, failsafe, timeout } = context.propsValue;
113
+ const auth = context.auth.props;
114
+ const baseUrl = `https://${service}.${auth.region}.amazonaws.com`;
115
+ let fullUrl = `${baseUrl}${path.startsWith('/') ? path : `/${path}`}`;
116
+ if (queryParams && Object.keys(queryParams).length > 0) {
117
+ const params = new URLSearchParams();
118
+ for (const [key, value] of Object.entries(queryParams)) {
119
+ if (value !== undefined && value !== null) {
120
+ params.append(key, String(value));
121
+ }
122
+ }
123
+ const queryString = params.toString();
124
+ if (queryString) {
125
+ fullUrl += `?${queryString}`;
126
+ }
127
+ }
128
+ const requestHeaders = Object.assign({}, ((_a = headers) !== null && _a !== void 0 ? _a : {}));
129
+ const bodyString = body ? JSON.stringify(body) : undefined;
130
+ if (bodyString) {
131
+ requestHeaders['content-type'] = (_b = requestHeaders['content-type']) !== null && _b !== void 0 ? _b : 'application/json';
132
+ }
133
+ const signed = yield signAwsRequest({
134
+ accessKeyId: auth.accessKeyId,
135
+ secretAccessKey: auth.secretAccessKey,
136
+ region: auth.region,
137
+ service,
138
+ method,
139
+ url: fullUrl,
140
+ headers: requestHeaders,
141
+ body: bodyString,
142
+ });
143
+ const request = {
144
+ method,
145
+ url: fullUrl,
146
+ headers: signed.headers,
147
+ body: bodyString ? JSON.parse(bodyString) : undefined,
148
+ timeout: timeout ? timeout * 1000 : 30000,
149
+ };
150
+ try {
151
+ const response = yield pieces_common_1.httpClient.sendRequest(request);
152
+ return {
153
+ status: response.status,
154
+ headers: response.headers,
155
+ body: response.body,
156
+ };
157
+ }
158
+ catch (error) {
159
+ if (failsafe) {
160
+ return {
161
+ error: (_c = error === null || error === void 0 ? void 0 : error.message) !== null && _c !== void 0 ? _c : 'Request failed',
162
+ response: (_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.body) !== null && _e !== void 0 ? _e : null,
163
+ };
164
+ }
165
+ throw error;
166
+ }
167
+ });
168
+ },
169
+ });
170
+ //# sourceMappingURL=custom-api-call.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-api-call.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-bedrock/src/lib/actions/custom-api-call.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAkF;AAClF,uCAA6C;AAC7C,uDAAmD;AACnD,yDAAsE;AACtE,qDAA+C;AAE/C,MAAM,oBAAoB,GAAG;IAC3B,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,SAAS,EAAE;IACtD,EAAE,KAAK,EAAE,6BAA6B,EAAE,KAAK,EAAE,iBAAiB,EAAE;IAClE,EAAE,KAAK,EAAE,+BAA+B,EAAE,KAAK,EAAE,eAAe,EAAE;IAClE;QACE,KAAK,EAAE,oCAAoC;QAC3C,KAAK,EAAE,uBAAuB;KAC/B;CACF,CAAC;AAEF,SAAe,cAAc;iEAAC,EAC5B,WAAW,EACX,eAAe,EACf,MAAM,EACN,OAAO,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,uBAAL,KAAK,CAAU,QAAQ,0CAAE,IAAI,mCAAI,IAAI;qBACjD,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare const generateContentFromImage: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ model: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
+ }>>;
11
+ image: import("@activepieces/pieces-framework").FileProperty<true>;
12
+ prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
13
+ systemPrompt: import("@activepieces/pieces-framework").LongTextProperty<false>;
14
+ temperature: import("@activepieces/pieces-framework").NumberProperty<false>;
15
+ maxTokens: import("@activepieces/pieces-framework").NumberProperty<false>;
16
+ }>;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateContentFromImage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_bedrock_runtime_1 = require("@aws-sdk/client-bedrock-runtime");
7
+ const client_bedrock_1 = require("@aws-sdk/client-bedrock");
8
+ const index_1 = require("../../index");
9
+ const common_1 = require("../common");
10
+ const EXTENSION_TO_FORMAT = {
11
+ png: client_bedrock_runtime_1.ImageFormat.PNG,
12
+ jpg: client_bedrock_runtime_1.ImageFormat.JPEG,
13
+ jpeg: client_bedrock_runtime_1.ImageFormat.JPEG,
14
+ gif: client_bedrock_runtime_1.ImageFormat.GIF,
15
+ webp: client_bedrock_runtime_1.ImageFormat.WEBP,
16
+ };
17
+ exports.generateContentFromImage = (0, pieces_framework_1.createAction)({
18
+ auth: index_1.awsBedrockAuth,
19
+ name: 'generate_content_from_image',
20
+ displayName: 'Generate Content from Image',
21
+ description: 'Ask a Bedrock model a question about an image.',
22
+ props: {
23
+ model: pieces_framework_1.Property.Dropdown({
24
+ displayName: 'Model',
25
+ required: true,
26
+ auth: index_1.awsBedrockAuth,
27
+ description: 'The foundation model to use. Must support image input.',
28
+ refreshers: [],
29
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
30
+ if (!auth) {
31
+ return {
32
+ disabled: true,
33
+ placeholder: 'Connect your AWS account first',
34
+ options: [],
35
+ };
36
+ }
37
+ return (0, common_1.getBedrockModelOptions)(auth.props, {
38
+ useInferenceProfiles: true,
39
+ inputModality: client_bedrock_1.ModelModality.IMAGE,
40
+ });
41
+ }),
42
+ }),
43
+ image: pieces_framework_1.Property.File({
44
+ displayName: 'Image',
45
+ required: true,
46
+ description: 'The image to analyze (PNG, JPEG, GIF, or WebP).',
47
+ }),
48
+ prompt: pieces_framework_1.Property.LongText({
49
+ displayName: 'Prompt',
50
+ required: true,
51
+ description: 'What do you want the model to tell you about the image?',
52
+ }),
53
+ systemPrompt: pieces_framework_1.Property.LongText({
54
+ displayName: 'System Prompt',
55
+ required: false,
56
+ description: 'Instructions that guide the model behavior.',
57
+ }),
58
+ temperature: pieces_framework_1.Property.Number({
59
+ displayName: 'Temperature',
60
+ required: false,
61
+ description: 'Controls randomness. Lower values produce more deterministic output.',
62
+ defaultValue: 0.7,
63
+ }),
64
+ maxTokens: pieces_framework_1.Property.Number({
65
+ displayName: 'Maximum Tokens',
66
+ required: false,
67
+ description: 'The maximum number of tokens to generate.',
68
+ defaultValue: 2048,
69
+ }),
70
+ },
71
+ run(_a) {
72
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
73
+ var _b;
74
+ const client = (0, common_1.createBedrockRuntimeClient)(auth.props);
75
+ const { model, image, prompt, systemPrompt, temperature, maxTokens } = propsValue;
76
+ const ext = ((_b = image.extension) !== null && _b !== void 0 ? _b : 'png').toLowerCase();
77
+ const format = EXTENSION_TO_FORMAT[ext];
78
+ if (!format) {
79
+ throw new Error(`Unsupported image format "${ext}". Supported: png, jpeg, gif, webp.`);
80
+ }
81
+ const imageBytes = Buffer.from(image.base64, 'base64');
82
+ try {
83
+ const response = yield client.send(new client_bedrock_runtime_1.ConverseCommand(Object.assign(Object.assign({ modelId: model, messages: [
84
+ {
85
+ role: client_bedrock_runtime_1.ConversationRole.USER,
86
+ content: [
87
+ {
88
+ image: {
89
+ format,
90
+ source: { bytes: imageBytes },
91
+ },
92
+ },
93
+ { text: prompt },
94
+ ],
95
+ },
96
+ ] }, (systemPrompt ? { system: [{ text: systemPrompt }] } : {})), { inferenceConfig: {
97
+ temperature: temperature !== null && temperature !== void 0 ? temperature : undefined,
98
+ maxTokens: maxTokens !== null && maxTokens !== void 0 ? maxTokens : undefined,
99
+ } })));
100
+ return (0, common_1.extractConverseTextResponse)(response);
101
+ }
102
+ catch (error) {
103
+ throw new Error((0, common_1.formatBedrockError)(error));
104
+ }
105
+ });
106
+ },
107
+ });
108
+ //# sourceMappingURL=generate-content-from-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-content-from-image.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/amazon-bedrock/src/lib/actions/generate-content-from-image.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4EAIyC;AACzC,4DAAwD;AACxD,uCAA6C;AAC7C,sCAKmB;AAEnB,MAAM,mBAAmB,GAAgC;IACvD,GAAG,EAAE,oCAAW,CAAC,GAAG;IACpB,GAAG,EAAE,oCAAW,CAAC,IAAI;IACrB,IAAI,EAAE,oCAAW,CAAC,IAAI;I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ACE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAC7D,eAAe,EAAE;wBACf,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS;wBACrC,SAAS,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,SAAS;qBAClC,IACD,CACH,CAAC;gBAEF,OAAO,IAAA,oCAA2B,EAAC,QAAQ,CAAC,CAAC;YAC/C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,IAAA,2BAAkB,EAAC,KAAK,CAAC,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const generateEmbeddings: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
+ }>, {
6
+ model: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ accessKeyId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
+ secretAccessKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
+ }>>;
11
+ inputText: import("@activepieces/pieces-framework").LongTextProperty<true>;
12
+ embeddingPurpose: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
13
+ dimensions: import("@activepieces/pieces-framework").NumberProperty<false>;
14
+ normalize: import("@activepieces/pieces-framework").CheckboxProperty<false>;
15
+ }>;