mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(Embeddings Google Gemini Node): Use credential host as baseUrl (#16615)
This commit is contained in:
@@ -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,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user