ModelUsageActivityDay#
Build extensions, choose hooks, and manage request-scoped state. See the guide.
- class zett_agent.extensions.usage_activity.ModelUsageActivityDay(*, date, requests, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, reasoning_tokens)[源代码]#
Aggregated model usage for one UTC calendar day.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- 参数:
date (date)
requests (Annotated[int, Ge(ge=0)])
input_tokens (Annotated[int, Ge(ge=0)])
output_tokens (Annotated[int, Ge(ge=0)])
cache_read_tokens (Annotated[int, Ge(ge=0)])
cache_write_tokens (Annotated[int, Ge(ge=0)])
reasoning_tokens (Annotated[int, Ge(ge=0)])
- property total_tokens: int#
Return input plus output tokens for this day.
Fields#
date(required)See the typed model signature for this field.
requests(required)See the typed model signature for this field.
input_tokens(required)See the typed model signature for this field.
output_tokens(required)See the typed model signature for this field.
cache_read_tokens(required)See the typed model signature for this field.
cache_write_tokens(required)See the typed model signature for this field.
reasoning_tokens(required)See the typed model signature for this field.