mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: phase 2 usage (#12121)
This commit is contained in:
committed by
GitHub
Unverified
parent
f0ee2d9f67
commit
2293ab0e21
@@ -1498,6 +1498,11 @@ impl Session {
|
||||
state.history.get_total_token_usage_breakdown()
|
||||
}
|
||||
|
||||
pub(crate) async fn total_token_usage(&self) -> Option<TokenUsage> {
|
||||
let state = self.state.lock().await;
|
||||
state.token_info().map(|info| info.total_token_usage)
|
||||
}
|
||||
|
||||
pub(crate) async fn get_estimated_token_count(
|
||||
&self,
|
||||
turn_context: &TurnContext,
|
||||
|
||||
Reference in New Issue
Block a user