n8n/packages/@n8n/nodes-langchain/credentials/GooglePalmApi.credentials.ts
oleg f1215cdb6b
feat(Google Gemini Chat Model Node): Add support for new Google Gemini models (#9130)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Michael Kret <michael.k@radency.com>
2024-04-15 13:56:44 +02:00

48 lines
855 B
TypeScript

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class GooglePalmApi implements ICredentialType {
name = 'googlePalmApi';
displayName = 'Google Gemini(PaLM) Api';
documentationUrl = 'google';
properties: INodeProperties[] = [
{
displayName: 'Host',
name: 'host',
required: true,
type: 'string',
default: 'https://generativelanguage.googleapis.com',
},
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
required: true,
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
qs: {
key: '={{$credentials.apiKey}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials.host}}/v1beta/models',
},
};
}