mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
add metric for per-turn token usage (#13454)
This commit is contained in:
1 parent
a4ad101125
commit
49634b7f9c
3 files changed
+54
-5
No files matched your search
@@ -15,6 +15,7 @@ use tokio::sync::oneshot;
|
||||
|
||||
use crate::codex::TurnContext;
|
||||
use crate::protocol::ReviewDecision;
|
||||
use crate::protocol::TokenUsage;
|
||||
use crate::tasks::SessionTask;
|
||||
|
||||
/// Metadata about the currently running turn.
|
||||
@@ -73,6 +74,7 @@ pub(crate) struct TurnState {
|
||||
pending_user_input: HashMap<String, oneshot::Sender<RequestUserInputResponse>>,
|
||||
pending_dynamic_tools: HashMap<String, oneshot::Sender<DynamicToolResponse>>,
|
||||
pending_input: Vec<ResponseInputItem>,
|
||||
pub(crate) token_usage_at_turn_start: TokenUsage,
|
||||
}
|
||||
|
||||
impl TurnState {
|
||||
|
||||
Reference in new issue
Block a user