davsclaus commented on code in PR #30521:
URL: https://github.com/apache/camel/pull/30521#discussion_r4647701666
##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java:
##########
@@ -1891,7 +1868,7 @@ private void recordUsage(LlmClient.ChatResponse response,
long latencyMs, String
response.usage().inputTokens(),
response.usage().outputTokens(),
response.usage().totalTokens(), latencyMs,
response.stopReason(), Instant.now(),
- AiUsageSource.TUI, null, questionCounter));
+ AiUsageSource.TUI, null, questionCounter, 0));
Review Comment:
Fixed in d3e942c9fd: the AI panel's own requests now keep
`response.usage().cachedTokens()`, so the CACHED column has them when the
provider reports them. A new test in `AiPanelTest` asks with a usage of 800
cached tokens and checks the usage summary. _Claude Code on behalf of Claus
Ibsen_
##########
docs/user-manual/modules/ROOT/pages/camel-jbang-tui-ai.adoc:
##########
@@ -212,6 +212,16 @@ average time per question (and per request in brackets),
the model table has an
the average per request for that model, and the *Time per question* chart next
to the token chart shows the
two side by side for each question, so you can see whether a slow answer was
the model or the tools.
+The integration rows count model calls only. At the GenAI observability level
`detailed` or `full`
+(`camel.aiObservability.level`), an agent run is recorded as an `invoke_agent`
span with one span per model call
+and one per tool call. The view counts its model calls, and a third summary
line gives the agent runs, their model
+and tool calls, and the level the spans were recorded at. At the default level
`basic` agent runs and tool calls are
Review Comment:
Fixed in d3e942c9fd: the sentence is split, and the CACHED sentence now also
says that the panel's own requests carry cached tokens. _Claude Code on behalf
of Claus Ibsen_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]