chatbot-agentic 1.0.6 → 1.0.7
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.
- package/dist/cjs/aws/index.d.ts +3 -0
- package/dist/cjs/aws/index.js +3 -1
- package/dist/cjs/aws/index.js.map +1 -1
- package/dist/cjs/aws/services/AWSBedrockRuntime.d.ts +4 -0
- package/dist/cjs/aws/services/AWSBedrockRuntime.js +27 -0
- package/dist/cjs/aws/services/AWSBedrockRuntime.js.map +1 -0
- package/dist/esm/aws/index.d.ts +3 -0
- package/dist/esm/aws/index.js +3 -1
- package/dist/esm/aws/index.js.map +1 -1
- package/dist/esm/aws/services/AWSBedrockRuntime.d.ts +4 -0
- package/dist/esm/aws/services/AWSBedrockRuntime.js +33 -0
- package/dist/esm/aws/services/AWSBedrockRuntime.js.map +1 -0
- package/package.json +3 -2
package/dist/cjs/aws/index.d.ts
CHANGED
|
@@ -16,4 +16,7 @@ export declare const AWS: {
|
|
|
16
16
|
AgentRuntime: {
|
|
17
17
|
invokeAgent: (data: import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandOutput>;
|
|
18
18
|
};
|
|
19
|
+
BedrockRuntime: {
|
|
20
|
+
invokeModel: (data: import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandInput) => Promise<import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandOutput>;
|
|
21
|
+
};
|
|
19
22
|
};
|
package/dist/cjs/aws/index.js
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AWS = void 0;
|
|
4
4
|
const AWSBedrockAgent_1 = require("./services/AWSBedrockAgent");
|
|
5
5
|
const AWSBedrockAgentRuntime_1 = require("./services/AWSBedrockAgentRuntime");
|
|
6
|
+
const AWSBedrockRuntime_1 = require("./services/AWSBedrockRuntime");
|
|
6
7
|
exports.AWS = {
|
|
7
8
|
Agent: AWSBedrockAgent_1.Agent,
|
|
8
|
-
AgentRuntime: AWSBedrockAgentRuntime_1.AgentRuntime
|
|
9
|
+
AgentRuntime: AWSBedrockAgentRuntime_1.AgentRuntime,
|
|
10
|
+
BedrockRuntime: AWSBedrockRuntime_1.BedrockRuntime
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":";;;AAAA,gEAAmD;AACnD,8EAAiE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":";;;AAAA,gEAAmD;AACnD,8EAAiE;AACjE,oEAA8D;AAGjD,QAAA,GAAG,GAAG;IACf,KAAK,EAAL,uBAAK;IACL,YAAY,EAAZ,qCAAY;IACZ,cAAc,EAAd,kCAAc;CACjB,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BedrockRuntime = void 0;
|
|
4
|
+
const client_bedrock_runtime_1 = require("@aws-sdk/client-bedrock-runtime");
|
|
5
|
+
const environment = (process.env.NODE_ENVIRONMENT || 'Test');
|
|
6
|
+
const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
|
|
7
|
+
const client = new client_bedrock_runtime_1.BedrockRuntimeClient({ region: awsRegion });
|
|
8
|
+
/**
|
|
9
|
+
* This is used to invoke the model
|
|
10
|
+
* @param data
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
const invokeModel = async (data) => {
|
|
14
|
+
try {
|
|
15
|
+
const command = new client_bedrock_runtime_1.InvokeModelCommand(data);
|
|
16
|
+
const response = await client.send(command);
|
|
17
|
+
return response;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.info(`error occured while invoke Model`);
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.BedrockRuntime = {
|
|
25
|
+
invokeModel
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=AWSBedrockRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AWSBedrockRuntime.js","sourceRoot":"","sources":["../../../../aws/services/AWSBedrockRuntime.ts"],"names":[],"mappings":";;;AAAA,4EAAqH;AAErH,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,6CAAoB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,GAAG,KAAK,EAAE,IAA4B,EAAG,EAAE;IAC1D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,2CAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAGY,QAAA,cAAc,GAAG;IAC3B,WAAW;CACb,CAAA"}
|
package/dist/esm/aws/index.d.ts
CHANGED
|
@@ -16,4 +16,7 @@ export declare const AWS: {
|
|
|
16
16
|
AgentRuntime: {
|
|
17
17
|
invokeAgent: (data: import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandOutput>;
|
|
18
18
|
};
|
|
19
|
+
BedrockRuntime: {
|
|
20
|
+
invokeModel: (data: import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandInput) => Promise<import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandOutput>;
|
|
21
|
+
};
|
|
19
22
|
};
|
package/dist/esm/aws/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Agent } from "./services/AWSBedrockAgent";
|
|
2
2
|
import { AgentRuntime } from "./services/AWSBedrockAgentRuntime";
|
|
3
|
+
import { BedrockRuntime } from "./services/AWSBedrockRuntime";
|
|
3
4
|
export const AWS = {
|
|
4
5
|
Agent,
|
|
5
|
-
AgentRuntime
|
|
6
|
+
AgentRuntime,
|
|
7
|
+
BedrockRuntime
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,KAAK;IACL,YAAY;IACZ,cAAc;CACjB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { BedrockRuntimeClient, InvokeModelCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
11
|
+
const environment = (process.env.NODE_ENVIRONMENT || 'Test');
|
|
12
|
+
const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
|
|
13
|
+
const client = new BedrockRuntimeClient({ region: awsRegion });
|
|
14
|
+
/**
|
|
15
|
+
* This is used to invoke the model
|
|
16
|
+
* @param data
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
const invokeModel = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
try {
|
|
21
|
+
const command = new InvokeModelCommand(data);
|
|
22
|
+
const response = yield client.send(command);
|
|
23
|
+
return response;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.info(`error occured while invoke Model`);
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const BedrockRuntime = {
|
|
31
|
+
invokeModel
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=AWSBedrockRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AWSBedrockRuntime.js","sourceRoot":"","sources":["../../../../aws/services/AWSBedrockRuntime.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAA4B,MAAM,iCAAiC,CAAC;AAErH,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAO,IAA4B,EAAG,EAAE;IAC1D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAA;AAGD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC3B,WAAW;CACb,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chatbot-agentic",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-sdk/client-bedrock-agent": "^3.936.0",
|
|
21
|
-
"@aws-sdk/client-bedrock-agent-runtime": "^3.846.0"
|
|
21
|
+
"@aws-sdk/client-bedrock-agent-runtime": "^3.846.0",
|
|
22
|
+
"@aws-sdk/client-bedrock-runtime": "^3.966.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@types/ms": "^0.7.31",
|