fix(app_controller): fix cost_tracker import in get_session_insights
This commit is contained in:
@@ -1765,7 +1765,7 @@ class AppController:
|
|||||||
self._update_cached_stats()
|
self._update_cached_stats()
|
||||||
|
|
||||||
def get_session_insights(self) -> Dict[str, Any]:
|
def get_session_insights(self) -> Dict[str, Any]:
|
||||||
import cost_tracker
|
from src import cost_tracker
|
||||||
total_input = sum(e["input"] for e in self._token_history)
|
total_input = sum(e["input"] for e in self._token_history)
|
||||||
total_output = sum(e["output"] for e in self._token_history)
|
total_output = sum(e["output"] for e in self._token_history)
|
||||||
total_tokens = total_input + total_output
|
total_tokens = total_input + total_output
|
||||||
|
|||||||
Reference in New Issue
Block a user