UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

60 lines 1.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MoonshotApi = void 0; class MoonshotApi { constructor() { this.name = 'moonshotApi'; this.displayName = 'Moonshot'; this.documentationUrl = 'moonshot'; this.properties = [ { displayName: 'API Key', name: 'apiKey', type: 'string', typeOptions: { password: true }, required: true, default: '', }, { displayName: 'Region', name: 'region', type: 'options', options: [ { name: 'International', value: 'international', description: 'platform.kimi.ai - international endpoint', }, { name: 'China', value: 'china', description: 'platform.moonshot.cn - mainland China endpoint', }, ], default: 'international', }, { displayName: 'Base URL', name: 'url', type: 'hidden', default: '={{ $self.region === "china" ? "https://api.moonshot.cn/v1" : "https://api.moonshot.ai/v1" }}', }, ]; this.authenticate = { type: 'generic', properties: { headers: { Authorization: '=Bearer {{$credentials.apiKey}}', }, }, }; this.test = { request: { baseURL: '={{ $credentials.url }}', url: '/models', }, }; } } exports.MoonshotApi = MoonshotApi; //# sourceMappingURL=MoonshotApi.credentials.js.map