From 2b745b6ab6bc16c4cc37a6c5745489f883946f89 Mon Sep 17 00:00:00 2001 From: Siddharth Prajosh Date: Wed, 26 Jun 2024 23:42:09 +0530 Subject: [PATCH] Add type hint for return --- agentops/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agentops/client.py b/agentops/client.py index 14d38448..157b60bc 100644 --- a/agentops/client.py +++ b/agentops/client.py @@ -388,7 +388,7 @@ def end_session( end_state_reason: Optional[str] = None, video: Optional[str] = None, is_auto_end: Optional[bool] = None, - ): + ) -> Decimal: """ End the current session with the AgentOps service. @@ -419,6 +419,7 @@ def end_session( if token_cost is None or token_cost == "unknown": logger.info("Could not determine cost of run.") + token_cost_d = Decimal(0) else: token_cost_d = Decimal(token_cost) logger.info(