mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(AWS Bedrock Chat Model Node): Improve filtering of Bedrock models & fix Claude 3 (#9085)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
parent
f62800cd72
commit
cfaab0b829
|
@ -64,7 +64,7 @@ export class EmbeddingsAwsBedrock implements INodeType {
|
||||||
routing: {
|
routing: {
|
||||||
request: {
|
request: {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/foundation-models',
|
url: '/foundation-models?byInferenceType=ON_DEMAND&byOutputModality=EMBEDDING',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
postReceive: [
|
postReceive: [
|
||||||
|
@ -74,13 +74,6 @@ export class EmbeddingsAwsBedrock implements INodeType {
|
||||||
property: 'modelSummaries',
|
property: 'modelSummaries',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'filter',
|
|
||||||
properties: {
|
|
||||||
// There isn't a good way to filter embedding models, so we atleast filter-out the default non-embedding ones
|
|
||||||
pass: "={{ !'anthropic.claude-instant-v1-100k,anthropic.claude-v2,amazon.titan-text-express-v1'.match($responseItem.modelId) }}",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'setKeyValue',
|
type: 'setKeyValue',
|
||||||
properties: {
|
properties: {
|
||||||
|
|
|
@ -68,7 +68,7 @@ export class LmChatAwsBedrock implements INodeType {
|
||||||
routing: {
|
routing: {
|
||||||
request: {
|
request: {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/foundation-models?&byOutputModality=TEXT',
|
url: '/foundation-models?&byOutputModality=TEXT&byInferenceType=ON_DEMAND',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
postReceive: [
|
postReceive: [
|
||||||
|
@ -78,13 +78,6 @@ export class LmChatAwsBedrock implements INodeType {
|
||||||
property: 'modelSummaries',
|
property: 'modelSummaries',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'filter',
|
|
||||||
properties: {
|
|
||||||
// Not a foundational model
|
|
||||||
pass: "={{ !['anthropic.claude-instant-v1-100k'].includes($responseItem.modelId) }}",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'setKeyValue',
|
type: 'setKeyValue',
|
||||||
properties: {
|
properties: {
|
||||||
|
|
|
@ -127,14 +127,14 @@
|
||||||
"n8n-core": "workspace:*"
|
"n8n-core": "workspace:*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-bedrock-runtime": "3.454.0",
|
"@aws-sdk/client-bedrock-runtime": "3.549.0",
|
||||||
"@aws-sdk/credential-provider-node": "3.451.0",
|
"@aws-sdk/credential-provider-node": "3.549.0",
|
||||||
"@getzep/zep-js": "0.9.0",
|
"@getzep/zep-js": "0.9.0",
|
||||||
"@google-ai/generativelanguage": "0.2.1",
|
"@google-ai/generativelanguage": "0.2.1",
|
||||||
"@huggingface/inference": "2.6.4",
|
"@huggingface/inference": "2.6.4",
|
||||||
"@langchain/anthropic": "^0.1.3",
|
"@langchain/anthropic": "^0.1.3",
|
||||||
"@langchain/cohere": "^0.0.5",
|
"@langchain/cohere": "^0.0.5",
|
||||||
"@langchain/community": "^0.0.34",
|
"@langchain/community": "0.0.44",
|
||||||
"@langchain/core": "0.1.41",
|
"@langchain/core": "0.1.41",
|
||||||
"@langchain/mistralai": "0.0.13",
|
"@langchain/mistralai": "0.0.13",
|
||||||
"@langchain/openai": "^0.0.16",
|
"@langchain/openai": "^0.0.16",
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
"ts-essentials": "^7.0.3"
|
"ts-essentials": "^7.0.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@langchain/community": "0.0.34",
|
"@langchain/community": "0.0.44",
|
||||||
"@langchain/core": "0.1.41",
|
"@langchain/core": "0.1.41",
|
||||||
"@langchain/openai": "0.0.16",
|
"@langchain/openai": "0.0.16",
|
||||||
"@n8n/client-oauth2": "workspace:*",
|
"@n8n/client-oauth2": "workspace:*",
|
||||||
|
|
1275
pnpm-lock.yaml
1275
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue