refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)
This commit is contained in:
committed by
GitHub
parent
52c574d83f
commit
be52176585
@@ -102,7 +102,7 @@ export class EmbeddingsCohere implements INodeType {
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings Cohere');
|
||||
const modelName = this.getNodeParameter('modelName', itemIndex, 'embed-english-v2.0') as string;
|
||||
const credentials = (await this.getCredentials('cohereApi')) as { apiKey: string };
|
||||
const credentials = await this.getCredentials<{ apiKey: string }>('cohereApi');
|
||||
const embeddings = new CohereEmbeddings({
|
||||
apiKey: credentials.apiKey,
|
||||
model: modelName,
|
||||
|
||||
Reference in New Issue
Block a user