diff --git a/packages/components/nodes/llms/GoogleVertexAI/GoogleVertexAI.ts b/packages/components/nodes/llms/GoogleVertexAI/GoogleVertexAI.ts index cb8ae61c..22133535 100644 --- a/packages/components/nodes/llms/GoogleVertexAI/GoogleVertexAI.ts +++ b/packages/components/nodes/llms/GoogleVertexAI/GoogleVertexAI.ts @@ -80,11 +80,11 @@ class GoogleVertexAI_LLMs implements INode { async init(nodeData: INodeData, _: string, options: ICommonObject): Promise { const credentialData = await getCredentialData(nodeData.credential ?? '', options) - const skipExtraCredentialFile = getCredentialParam('skipExtraCredentialFile', credentialData, nodeData) const googleApplicationCredentialFilePath = getCredentialParam('googleApplicationCredentialFilePath', credentialData, nodeData) const googleApplicationCredential = getCredentialParam('googleApplicationCredential', credentialData, nodeData) const projectID = getCredentialParam('projectID', credentialData, nodeData) + if (!skipExtraCredentialFile && !googleApplicationCredentialFilePath && !googleApplicationCredential) throw new Error('Please specify your Google Application Credential') const inputs = [googleApplicationCredentialFilePath, googleApplicationCredential, skipExtraCredentialFile] @@ -115,8 +115,6 @@ class GoogleVertexAI_LLMs implements INode { model: modelName } - if (authOptions) obj.authOptions = authOptions - if (maxOutputTokens) obj.maxOutputTokens = parseInt(maxOutputTokens, 10) if (topP) obj.topP = parseFloat(topP)