feat: Add DeepSeek Chat Model node (#12873)

This commit is contained in:
oleg
2025-01-28 16:43:50 +01:00
committed by GitHub
parent d5062189db
commit 9918afa51b
6 changed files with 306 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class DeepSeekApi implements ICredentialType {
name = 'deepSeekApi';
displayName = 'DeepSeek';
documentationUrl = 'deepseek';
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
required: true,
default: '',
},
{
displayName: 'Base URL',
name: 'url',
type: 'hidden',
default: 'https://api.deepseek.com',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{ $credentials.url }}',
url: '/models',
},
};
}