fix(Embeddings Google Gemini Node): Use credential host as baseUrl (#16615)

This commit is contained in:
Benjamin Schroth
2025-06-23 12:58:56 +02:00
committed by GitHub
parent 525cfccffd
commit 662ac1bb57

View File

@@ -111,7 +111,7 @@ export class EmbeddingsGoogleGemini implements INodeType {
property: 'model', property: 'model',
}, },
}, },
default: 'textembedding-gecko-multilingual@latest', default: 'models/text-embedding-004',
}, },
], ],
}; };
@@ -121,11 +121,12 @@ export class EmbeddingsGoogleGemini implements INodeType {
const modelName = this.getNodeParameter( const modelName = this.getNodeParameter(
'modelName', 'modelName',
itemIndex, itemIndex,
'textembedding-gecko-multilingual@latest', 'models/text-embedding-004',
) as string; ) as string;
const credentials = await this.getCredentials('googlePalmApi'); const credentials = await this.getCredentials('googlePalmApi');
const embeddings = new GoogleGenerativeAIEmbeddings({ const embeddings = new GoogleGenerativeAIEmbeddings({
apiKey: credentials.apiKey as string, apiKey: credentials.apiKey as string,
baseUrl: credentials.host as string,
model: modelName, model: modelName,
}); });