update bedrock

This commit is contained in:
Henry
2023-12-15 17:49:29 +00:00
parent 1b0b1f13fa
commit 6e4822c3bb
3 changed files with 39 additions and 11 deletions
@@ -18,7 +18,7 @@ class AWSBedrockEmbedding_Embeddings implements INode {
constructor() {
this.label = 'AWS Bedrock Embeddings'
this.name = 'AWSBedrockEmbeddings'
this.version = 2.0
this.version = 3.0
this.type = 'AWSBedrockEmbeddings'
this.icon = 'awsBedrock.png'
this.category = 'Embeddings'
@@ -86,6 +86,13 @@ class AWSBedrockEmbedding_Embeddings implements INode {
{ label: 'cohere.embed-multilingual-v3', name: 'cohere.embed-multilingual-v3' }
],
default: 'amazon.titan-embed-text-v1'
},
{
label: 'Custom Model Name',
name: 'customModel',
description: 'If provided, will override model selected from Model Name option',
type: 'string',
optional: true
}
]
}
@@ -93,9 +100,10 @@ class AWSBedrockEmbedding_Embeddings implements INode {
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const iRegion = nodeData.inputs?.region as string
const iModel = nodeData.inputs?.model as string
const customModel = nodeData.inputs?.customModel as string
const obj: BedrockEmbeddingsParams = {
model: iModel,
model: customModel ?? iModel,
region: iRegion
}