Skip to content

Commit

Permalink
Chat anthropic throws error for browser executor because CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
abrenneke committed Aug 1, 2024
1 parent 137c3a4 commit 21fefdb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ export const ChatAnthropicNodeImpl: PluginNodeImpl<ChatAnthropicNode> = {
},

async process(data, inputs: Inputs, context: InternalProcessContext): Promise<Outputs> {
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
Expand Down

0 comments on commit 21fefdb

Please sign in to comment.