@n8n/n8n-nodes-langchain
Version:

60 lines • 1.93 kB
JavaScript
;
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