openlit
Version:
OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects
30 lines • 1.18 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const helpers_1 = __importDefault(require("./helpers"));
class OpenlitConfig {
static async updatePricingJson(pricing_json) {
try {
const response = await helpers_1.default.fetchPricingInfo(pricing_json);
this.pricingInfo = response;
}
catch (e) {
this.pricingInfo = {};
}
return this.pricingInfo;
}
static updateConfig({ environment = 'default', applicationName = 'default', tracer, otlpEndpoint, otlpHeaders, disableBatch = true, traceContent = true, pricing_json, }) {
this.environment = environment;
this.applicationName = applicationName;
this.tracer = tracer;
this.otlpEndpoint = otlpEndpoint;
this.otlpHeaders = otlpHeaders;
this.disableBatch = disableBatch;
this.traceContent = traceContent;
this.pricing_json = pricing_json;
}
}
exports.default = OpenlitConfig;
//# sourceMappingURL=config.js.map