UNPKG

openai-swarmjs

Version:

Agentic framework inspired from OpenAI's swarm framework for TS, JS

17 lines (16 loc) 702 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.debugPrint = debugPrint; const chalk_1 = __importDefault(require("chalk")); function debugPrint(debug, ...args) { if (!debug) return; const timestamp = new Date().toISOString().replace('T', ' ').split('.')[0]; const message = args .map((arg) => typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)) .join(' '); console.log(chalk_1.default.white(`[${chalk_1.default.gray(timestamp)}] ${chalk_1.default.gray(message)}`)); }