newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 143 forks source link

AIM: Implement setLlmTokenCountCallback API #1777

Closed jasonjkeller closed 7 months ago

jasonjkeller commented 8 months ago

Agent Spec: https://source.datanerd.us/agents/agent-specs/blob/main/APIs/llm_token_count.md

Add API for setting a callback that so that users can provide a token count.


Might be similar to the work that was done to add an error grouping callback: https://github.com/newrelic/newrelic-java-agent/pull/1195/files

workato-integration[bot] commented 8 months ago

https://new-relic.atlassian.net/browse/NR-234834