@mastra/core
Version:
44 lines (43 loc) • 1.18 kB
JavaScript
const require_logger = require("./logger-BPclhj7J.cjs");
//#region ../_internal-core/dist/base/index.js
var MastraBase = class {
component = require_logger.RegisteredLogger.LLM;
logger;
name;
#rawConfig;
constructor({ component, name, rawConfig }) {
this.component = component || require_logger.RegisteredLogger.LLM;
this.name = name;
this.#rawConfig = rawConfig;
this.logger = new require_logger.ConsoleLogger({ name: `${this.component} - ${this.name}` });
}
/**
* Returns the raw storage configuration this primitive was created from,
* or undefined if it was created from code.
*/
toRawConfig() {
return this.#rawConfig;
}
/**
* Sets the raw storage configuration for this primitive.
* @internal
*/
__setRawConfig(rawConfig) {
this.#rawConfig = rawConfig;
}
/**
* Set the logger for the agent
* @param logger
*/
__setLogger(logger) {
this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
}
};
//#endregion
Object.defineProperty(exports, "MastraBase", {
enumerable: true,
get: function() {
return MastraBase;
}
});
//# sourceMappingURL=base-B6soWsYg.cjs.map