fix bedrock model empty bug

This commit is contained in:
Henry 2023-12-19 01:31:09 +00:00
parent a1fb5b8ef6
commit 7952ef8df5
3 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ class AWSChatBedrock_ChatModels implements INode {
const obj: BaseBedrockInput & BaseChatModelParams = {
region: iRegion,
model: customModel ?? iModel,
model: customModel ? customModel : iModel,
maxTokens: parseInt(iMax_tokens_to_sample, 10),
temperature: parseFloat(iTemperature),
streaming: streaming ?? true

View File

@ -103,7 +103,7 @@ class AWSBedrockEmbedding_Embeddings implements INode {
const customModel = nodeData.inputs?.customModel as string
const obj: BedrockEmbeddingsParams = {
model: customModel ?? iModel,
model: customModel ? customModel : iModel,
region: iRegion
}

View File

@ -143,7 +143,7 @@ class AWSBedrock_LLMs implements INode {
const iMax_tokens_to_sample = nodeData.inputs?.max_tokens_to_sample as string
const cache = nodeData.inputs?.cache as BaseCache
const obj: Partial<BaseBedrockInput> & BaseLLMParams = {
model: customModel ?? iModel,
model: customModel ? customModel : iModel,
region: iRegion,
temperature: parseFloat(iTemperature),
maxTokens: parseInt(iMax_tokens_to_sample, 10)