mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 01:07:04 +02:00
fix(Embeddings Google Gemini Node): Use credential host as baseUrl (#16615)
This commit is contained in:
parent
525cfccffd
commit
662ac1bb57
|
|
@ -111,7 +111,7 @@ export class EmbeddingsGoogleGemini implements INodeType {
|
|||
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(
|
||||
'modelName',
|
||||
itemIndex,
|
||||
'textembedding-gecko-multilingual@latest',
|
||||
'models/text-embedding-004',
|
||||
) as string;
|
||||
const credentials = await this.getCredentials('googlePalmApi');
|
||||
const embeddings = new GoogleGenerativeAIEmbeddings({
|
||||
apiKey: credentials.apiKey as string,
|
||||
baseUrl: credentials.host as string,
|
||||
model: modelName,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user