UNPKG

hugbot

Version:

Chatbot maker for HuggingFace Inference API and other AI API providers and backends.

18 lines 533 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BotStorage = void 0; /** * Bot storage container. Maps bot id's to their builder functions. * The bot is instantiated during retieval with get() method. */ const BotStorage = () => { const store = new Map(); const put = (id, fn) => { store.set(id, fn); return { put, get }; }; const get = (id) => store.get(id)(); return { put, get }; }; exports.BotStorage = BotStorage; //# sourceMappingURL=botStorage.js.map