n8n-nodes-wxai
Version:
A user-friendly WXAI node for n8n, designed to enhance your workflow with Gemini 2.0 Flash model. Supports chat completions with configurable parameters.
51 lines (50 loc) • 1.7 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Wxai = void 0;
const ChatDescription_1 = require("./ChatDescription");
class Wxai {
constructor() {
this.description = {
displayName: 'WXAI',
name: 'wxai',
icon: 'file:wxai.svg',
group: ['transform'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Consume WXAI API with Gemini 2.0 Flash model',
defaults: {
name: 'WXAI',
},
inputs: [{ type: "main" /* NodeConnectionType.Main */ }],
outputs: [{ type: "main" /* NodeConnectionType.Main */ }],
credentials: [
{
name: 'wxaiApi',
required: true,
},
],
requestDefaults: {
ignoreHttpStatusErrors: true,
baseURL: '={{$credentials.baseUrl}}',
},
properties: [
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: [
{
name: 'Chat',
value: 'chat',
},
],
default: 'chat',
},
...ChatDescription_1.chatOperations,
...ChatDescription_1.chatFields,
],
};
}
}
exports.Wxai = Wxai;