From 21fefdbdc5046bf41213e5f8db1b2c1a6912e2c2 Mon Sep 17 00:00:00 2001 From: Andy Brenneke Date: Thu, 1 Aug 2024 11:11:20 -0700 Subject: [PATCH] Chat anthropic throws error for browser executor because CORS --- .../core/src/plugins/anthropic/nodes/ChatAnthropicNode.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/plugins/anthropic/nodes/ChatAnthropicNode.ts b/packages/core/src/plugins/anthropic/nodes/ChatAnthropicNode.ts index acdb888ea..0da1d88cb 100644 --- a/packages/core/src/plugins/anthropic/nodes/ChatAnthropicNode.ts +++ b/packages/core/src/plugins/anthropic/nodes/ChatAnthropicNode.ts @@ -317,6 +317,10 @@ export const ChatAnthropicNodeImpl: PluginNodeImpl = { }, async process(data, inputs: Inputs, context: InternalProcessContext): Promise { + if (context.executor === 'browser') { + throw new Error('This node requires using the Node executor'); + } + const output: Outputs = {}; const rawModel = data.useModelInput ? coerceTypeOptional(inputs['model' as PortId], 'string') ?? data.model