mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 09:10:13 +01:00
1b4559f57f
* 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
17 lines
405 B
JavaScript
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;
|