-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e704752
commit 10aad18
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
agents/ten_packages/system/ten_ai_base/interface/ten_ai_base/usage.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from pydantic import BaseModel | ||
|
||
class LLMCompletionTokensDetails(BaseModel): | ||
accepted_prediction_tokens: int = 0 | ||
audio_tokens: int = 0 | ||
reasoning_tokens: int = 0 | ||
rejected_prediction_tokens: int = 0 | ||
|
||
class LLMPromptTokensDetails(BaseModel): | ||
audio_tokens: int = 0 | ||
cached_tokens: int = 0 | ||
|
||
class LLMUsage(BaseModel): | ||
completion_tokens: int = 0 | ||
prompt_tokens: int = 0 | ||
total_tokens: int = 0 | ||
|
||
completion_tokens_details: LLMCompletionTokensDetails | None = None | ||
prompt_tokens_details: LLMPromptTokensDetails | None = None |