@n8n/n8n-nodes-langchain
Version:

59 lines (57 loc) • 2.19 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var GuardrailsV2_node_exports = {};
__export(GuardrailsV2_node_exports, {
GuardrailsV2: () => GuardrailsV2
});
module.exports = __toCommonJS(GuardrailsV2_node_exports);
var import_n8n_workflow = require("n8n-workflow");
var import_execute = require("../actions/execute");
var import_description = require("../description");
var import_configureNodeInputs = require("../helpers/configureNodeInputs");
class GuardrailsV2 {
constructor(baseDescription) {
this.description = {
...baseDescription,
version: [2],
inputs: `={{(${import_configureNodeInputs.configureNodeInputsV2})($parameter)}}`,
outputs: `={{
((parameters) => {
const operation = parameters.operation ?? 'classify';
if (operation === 'classify') {
return [{displayName: "Pass", type: "${import_n8n_workflow.NodeConnectionTypes.Main}"}, {displayName: "Fail", type: "${import_n8n_workflow.NodeConnectionTypes.Main}"}]
}
return [{ displayName: "", type: "${import_n8n_workflow.NodeConnectionTypes.Main}"}]
})($parameter)
}}`,
defaults: {
name: "Guardrails"
},
properties: import_description.propertiesDescription
};
}
async execute() {
return await import_execute.execute.call(this);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GuardrailsV2
});
//# sourceMappingURL=GuardrailsV2.node.js.map