Track cumulative token usage in assistant2 when using anthropic API (#26738)
Release Notes: - N/A
This commit is contained in:
parent
e3c0f56a96
commit
8e0e291bd5
8 changed files with 136 additions and 25 deletions
|
@ -553,7 +553,7 @@ pub struct Metadata {
|
|||
pub user_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct Usage {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub input_tokens: Option<u32>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue