diff --git a/agentops/client.py b/agentops/client.py index 48255a75..5c1cd4eb 100644 --- a/agentops/client.py +++ b/agentops/client.py @@ -240,8 +240,11 @@ def end_session(self, self._session.video = video self._session.end_session(end_state, end_state_reason) - token_cost = float(self._worker.end_session(self._session)) - print('🖇 AgentOps: This run cost ${:.6f}'.format(token_cost)) + token_cost = self._worker.end_session(self._session) + if token_cost is 'unknown': + print('🖇 AgentOps: Could not determine cost of run.') + else: + print('🖇 AgentOps: This run cost ${:.6f}'.format(float(token_cost))) self._session = None self._worker = None diff --git a/pyproject.toml b/pyproject.toml index 1171f57e..5b7a34b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "agentops" -version = "0.1.2" +version = "0.1.3" authors = [ { name="Alex Reibman", email="areibman@gmail.com" }, { name="Shawn Qiu", email="siyangqiu@gmail.com" },