anything-llm/server/utils/agents/aibitat/providers/helpers/classes.js
Timothy Carambat 1b4559f57f
Add LMStudio agent support (generic) support (#1246)
* add LMStudio agent support (generic) support
"work" with non-tool callable LLMs, highly dependent on system specs

* add comments

* enable few-shot prompting per function for OSS models
2024-05-07 16:35:47 -07:00

17 lines
405 B
JavaScript

function InheritMultiple(bases = []) {
class Bases {
constructor() {
bases.forEach((base) => Object.assign(this, new base()));
}
}
bases.forEach((base) => {
Object.getOwnPropertyNames(base.prototype)
.filter((prop) => prop != "constructor")
.forEach((prop) => (Bases.prototype[prop] = base.prototype[prop]));
});
return Bases;
}
module.exports = InheritMultiple;