Bedrock Usage Tracker
llmfy.llmfy_core.models.google.googleai_usage
track_googleai_usage(func)
Decorator to wrap __call_googleai calls on GoogleAIModel.
Source code in llmfy/llmfy_core/models/google/googleai_usage.py
track_googleai_stream_usage(func)
Decorator to wrap __call_stream_googleai calls on GoogleAIModel.
Source code in llmfy/llmfy_core/models/google/googleai_usage.py
track_googleai_embedding_usage(func)
Decorator to wrap __call_googleai_embedding calls on GoogleAIEmbedding.
The wrapped function must accept (model, contents, client) so the decorator can call count_tokens before embedding, since EmbedContentResponse carries no usage metadata.