diff --git a/agentops/client.py b/agentops/client.py index c7986b2a6..3ed8f1cb4 100644 --- a/agentops/client.py +++ b/agentops/client.py @@ -272,13 +272,13 @@ def end_session(self, self._session.video = video self._session.end_session(end_state, end_state_reason) - token_cost = Decimal(self._worker.end_session(self._session)) + token_cost = self._worker.end_session(self._session) if token_cost == 'unknown': print('🖇 AgentOps: Could not determine cost of run.') else: - + token_cost_d = Decimal(token_cost) print('🖇 AgentOps: This run cost ${}'.format('{:.2f}'.format( - token_cost) if token_cost == 0 else '{:.6f}'.format(token_cost))) + token_cost_d) if token_cost_d == 0 else '{:.6f}'.format(token_cost_d))) self._session = None self._worker = None