@nomyx/assistant
Version:
A powerful assistant library and cli for your AI projects. works with Vertex AI (Claude and Gemini)
32 lines (31 loc) • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MiddlewareManager = void 0;
class MiddlewareManager {
constructor() {
this.middleware = [];
this.plugins = [];
}
use(middleware) {
this.middleware.push(middleware);
}
registerPlugin(plugin, config) {
this.plugins.push(plugin);
plugin.initialize({
chat: async () => { throw new Error('Not implemented'); },
streamChat: async function* () { throw new Error('Not implemented'); },
getCapabilities: () => { throw new Error('Not implemented'); },
use: () => { throw new Error('Not implemented'); },
registerPlugin: () => { throw new Error('Not implemented'); },
convertToolSchema: () => { throw new Error('Not implemented'); },
convertToolCall: () => { throw new Error('Not implemented'); },
});
}
getMiddleware() {
return this.middleware;
}
getPlugins() {
return this.plugins;
}
}
exports.MiddlewareManager = MiddlewareManager;