UNPKG

n8n-nodes-openai-analytics

Version:
24 lines 901 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAssistants = void 0; async function getAssistants(context) { const { openai, functionThis, i } = context; const limit = functionThis.getNodeParameter('assistantsLimit', i, 20); const order = functionThis.getNodeParameter('assistantsOrder', i, 'desc'); const after = functionThis.getNodeParameter('assistantsAfter', i, ''); const before = functionThis.getNodeParameter('assistantsBefore', i, ''); const listParams = { limit, order, }; if (after) listParams.after = after; if (before) listParams.before = before; const assistantsResponse = await openai.beta.assistants.list(listParams); return { json: { assistants: assistantsResponse.data } }; } exports.getAssistants = getAssistants; //# sourceMappingURL=getAssistants.js.map