public class AiMonitoringImpl
extends java.lang.Object
implements com.newrelic.api.agent.AiMonitoring
AiMonitoring interface and provides methods for feedback event recording
and setting callbacks for token calculation.| Constructor and Description |
|---|
AiMonitoringImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
recordLlmFeedbackEvent(java.util.Map<java.lang.String,java.lang.Object> llmFeedbackEventAttributes)
Records an LlmFeedbackMessage event.
|
void |
setLlmTokenCountCallback(com.newrelic.api.agent.LlmTokenCountCallback llmTokenCountCallback)
Sets the callback for token calculation and reports a supportability metric.
|
public void recordLlmFeedbackEvent(java.util.Map<java.lang.String,java.lang.Object> llmFeedbackEventAttributes)
recordLlmFeedbackEvent in interface com.newrelic.api.agent.AiMonitoringllmFeedbackEventAttributes - A map containing the attributes of an LlmFeedbackMessage event. To construct
the llmFeedbackEventAttributes map, use
LlmFeedbackEventAttributes.Builder
Required Attributes:
public void setLlmTokenCountCallback(com.newrelic.api.agent.LlmTokenCountCallback llmTokenCountCallback)
setLlmTokenCountCallback in interface com.newrelic.api.agent.AiMonitoringllmTokenCountCallback - The callback instance implementing LlmTokenCountCallback interface.
This callback will be used for token calculation.LlmTokenCountCallback