assistant2: Serialize token usage (#27586)
We'll need this for detecting old long threads Release Notes: - N/A
This commit is contained in:
parent
76d3a9a0f0
commit
f15a241d3e
2 changed files with 6 additions and 3 deletions
|
@ -286,8 +286,7 @@ impl Thread {
|
|||
tool_use,
|
||||
action_log: cx.new(|_| ActionLog::new()),
|
||||
initial_project_snapshot: Task::ready(serialized.initial_project_snapshot).shared(),
|
||||
// TODO: persist token usage?
|
||||
cumulative_token_usage: TokenUsage::default(),
|
||||
cumulative_token_usage: serialized.cumulative_token_usage,
|
||||
feedback: None,
|
||||
}
|
||||
}
|
||||
|
@ -648,6 +647,7 @@ impl Thread {
|
|||
})
|
||||
.collect(),
|
||||
initial_project_snapshot,
|
||||
cumulative_token_usage: this.cumulative_token_usage.clone(),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue