newrelic
Version:
New Relic agent
22 lines (16 loc) • 567 B
JavaScript
/*
* Copyright 2025 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
const LlmEvent = require('./event')
class LlmEmbedding extends LlmEvent {
constructor({ agent, segment, request = {}, response = {}, withError = false, transaction }) {
super({ agent, segment, request, response, responseAttrs: true, transaction })
this.error = withError
if (agent.config.ai_monitoring.record_content.enabled === true) {
this.input = request.contents?.toString()
}
}
}
module.exports = LlmEmbedding