wenjin272 commented on code in PR #861:
URL: https://github.com/apache/flink-agents/pull/861#discussion_r3557289583


##########
python/flink_agents/api/chat_models/chat_model.py:
##########
@@ -273,8 +278,10 @@ def _record_token_metrics(
             The number of prompt tokens
         completion_tokens : int
             The number of completion tokens
+        metric_group : MetricGroup | None
+            The metric group captured when the request was initiated. If None, 
token
+            metrics are skipped.
         """
-        metric_group = self.metric_group
         if metric_group is None:

Review Comment:
   One parity question: Python `_record_token_metrics(..., metric_group=None)` 
is a no-op, while Java `recordTokenMetrics(null, ...)` fails via 
`checkNotNull`. Should we align the lower-level helper contract?



-- 
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]

Reply via email to