@stacksjs/ai 0.61.24 → 0.63.0
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/index.js +3 -0
- package/dist/index.js.map +11 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/utils/client-bedrock.ts", "../src/utils/client-bedrock-runtime.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type {\n CreateModelCustomizationJobCommandInput,\n CreateModelCustomizationJobCommandOutput,\n GetModelCustomizationJobCommandInput,\n GetModelCustomizationJobCommandOutput,\n ListFoundationModelsCommandInput,\n ListFoundationModelsCommandOutput,\n} from '@aws-sdk/client-bedrock'\nimport {\n BedrockClient,\n CreateModelCustomizationJobCommand,\n GetModelCustomizationJobCommand,\n ListFoundationModelsCommand,\n} from '@aws-sdk/client-bedrock'\n\nconst client = new BedrockClient({ region: process.env.REGION || 'us-east-1' })\nconst logger = console // import your own logger\n\n/*\n * Create Model Customization Job\n * @param {CreateModelCustomizationJobCommandInput} params\n * @returns {Promise<CreateModelCustomizationJobCommandOutput>}\n * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Bedrock.html#CreateModelCustomizationJob-property\n */\nexport async function createModelCustomizationJob(\n param: CreateModelCustomizationJobCommandInput,\n): Promise<CreateModelCustomizationJobCommandOutput> {\n logger.debug(param)\n const command = new CreateModelCustomizationJobCommand(param)\n const res = await client.send(command)\n logger.debug('Successfully create model customization job')\n logger.debug(res)\n return res\n}\n\n/*\n * Get Model Customization Job\n * @param {GetModelCustomizationJobCommandInput} params\n * @returns {Promise<GetModelCustomizationJobCommandOutput>}\n * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Bedrock.html#getModelCustomizationJob-property\n */\nexport async function getModelCustomizationJob(\n params: GetModelCustomizationJobCommandInput,\n): Promise<GetModelCustomizationJobCommandOutput> {\n logger.debug(params)\n const command = new GetModelCustomizationJobCommand(params)\n const res = await client.send(command)\n logger.debug('Successfully get model customization job')\n logger.debug(res)\n return res\n}\n\n/*\n * List Foundation Models\n * @param {ListFoundationModelsCommandInput} params\n * @returns {Promise<ListFoundationModelsCommandOutput>}\n * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Bedrock.html#listFoundationModels-property\n */\nexport async function listFoundationModels(\n params: ListFoundationModelsCommandInput,\n): Promise<ListFoundationModelsCommandOutput> {\n logger.debug(params)\n const command = new ListFoundationModelsCommand(params)\n const res = await client.send(command)\n logger.debug('Successfully list foundation models')\n logger.debug(res)\n return res\n}\n\nexport type {\n CreateModelCustomizationJobCommandInput,\n GetModelCustomizationJobCommandInput,\n ListFoundationModelsCommandInput,\n}\n",
|
|
6
|
+
"import type {\n InvokeModelCommandInput,\n InvokeModelCommandOutput,\n InvokeModelWithResponseStreamCommandInput,\n InvokeModelWithResponseStreamCommandOutput,\n} from '@aws-sdk/client-bedrock-runtime'\nimport {\n BedrockRuntimeClient,\n InvokeModelCommand,\n InvokeModelWithResponseStreamCommand,\n} from '@aws-sdk/client-bedrock-runtime'\n\nconst client = new BedrockRuntimeClient({\n region: process.env.REGION || 'us-east-1',\n})\nconst logger = console // import your own logger\n\n/*\n * Invoke Model\n * @param {InvokeModelCommandInput} params\n * @returns {Promise<InvokeModelCommandOutput>}\n * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/BedrockRuntime.html#invokeModel-property\n */\nexport async function invokeModel(params: InvokeModelCommandInput): Promise<InvokeModelCommandOutput> {\n logger.debug(params)\n const command = new InvokeModelCommand(params)\n const res = await client.send(command)\n logger.debug('Successfully invoke model')\n logger.debug(res)\n return res\n}\n\n/*\n * Invoke Model With Response Stream\n * @param {InvokeModelWithResponseStreamCommandInput} params\n * @returns {Promise<InvokeModelWithResponseStreamCommandOutput>}\n * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/BedrockRuntime.html#invokeModelWithResponseStream-property\n */\nexport async function invokeModelWithResponseStream(\n params: InvokeModelWithResponseStreamCommandInput,\n): Promise<InvokeModelWithResponseStreamCommandOutput> {\n logger.debug(params)\n const command = new InvokeModelWithResponseStreamCommand(params)\n const res = await client.send(command)\n logger.debug('Successfully invoke model with response stream')\n logger.debug(res)\n return res\n}\n\nexport type { InvokeModelCommandInput, InvokeModelWithResponseStreamCommandInput }\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";AAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,eAAsB,2BAA2B,CAC/C,OACmD;AACnD,SAAO,MAAM,KAAK;AAClB,QAAM,UAAU,IAAI,mCAAmC,KAAK;AAC5D,QAAM,MAAM,MAAM,OAAO,KAAK,OAAO;AACrC,SAAO,MAAM,6CAA6C;AAC1D,SAAO,MAAM,GAAG;AAChB,SAAO;AAAA;AAST,eAAsB,wBAAwB,CAC5C,QACgD;AAChD,SAAO,MAAM,MAAM;AACnB,QAAM,UAAU,IAAI,gCAAgC,MAAM;AAC1D,QAAM,MAAM,MAAM,OAAO,KAAK,OAAO;AACrC,SAAO,MAAM,0CAA0C;AACvD,SAAO,MAAM,GAAG;AAChB,SAAO;AAAA;AAST,eAAsB,oBAAoB,CACxC,QAC4C;AAC5C,SAAO,MAAM,MAAM;AACnB,QAAM,UAAU,IAAI,4BAA4B,MAAM;AACtD,QAAM,MAAM,MAAM,OAAO,KAAK,OAAO;AACrC,SAAO,MAAM,qCAAqC;AAClD,SAAO,MAAM,GAAG;AAChB,SAAO;AAAA;AAnDT,IAAM,SAAS,IAAI,cAAc,EAAE,QAAQ,QAAQ,IAAI,UAAU,YAAY,CAAC;AAC9E,IAAM,SAAS;;ACVf;AAAA;AAAA;AAAA;AAAA;AAiBA,eAAsB,WAAW,CAAC,QAAoE;AACpG,UAAO,MAAM,MAAM;AACnB,QAAM,UAAU,IAAI,mBAAmB,MAAM;AAC7C,QAAM,MAAM,MAAM,QAAO,KAAK,OAAO;AACrC,UAAO,MAAM,2BAA2B;AACxC,UAAO,MAAM,GAAG;AAChB,SAAO;AAAA;AAST,eAAsB,6BAA6B,CACjD,QACqD;AACrD,UAAO,MAAM,MAAM;AACnB,QAAM,UAAU,IAAI,qCAAqC,MAAM;AAC/D,QAAM,MAAM,MAAM,QAAO,KAAK,OAAO;AACrC,UAAO,MAAM,gDAAgD;AAC7D,UAAO,MAAM,GAAG;AAChB,SAAO;AAAA;AAlCT,IAAM,UAAS,IAAI,qBAAqB;AAAA,EACtC,QAAQ,QAAQ,IAAI,UAAU;AAChC,CAAC;AACD,IAAM,UAAS;",
|
|
9
|
+
"debugId": "5BD891C214399E2564756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.63.0",
|
|
5
5
|
"description": "Stacks Artificial Intelligence.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"prepublishOnly": "bun run build"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@aws-sdk/client-bedrock-runtime": "^3.
|
|
52
|
+
"@aws-sdk/client-bedrock-runtime": "^3.632.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@aws-sdk/client-bedrock-runtime": "^3.
|
|
55
|
+
"@aws-sdk/client-bedrock-runtime": "^3.632.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@stacksjs/development": "latest"
|