autogen
autogen.gather_usage_summary
gather_usage_summary
Gather usage summary from all agents.
Name | Description |
---|---|
agents | (list): List of agents. Type: list[Agent] |
Type | Description |
---|---|
dict[dict[str, dict[str, typing.Any]], dict[str, dict[str, typing.Any]]] | dictionary: A dictionary containing two keys: - “usage_including_cached_inference”: Cost information on the total usage, including the tokens in cached inference. - “usage_excluding_cached_inference”: Cost information on the usage of tokens, excluding the tokens in cache. No larger than “usage_including_cached_inference”. Example: python \{ "usage_including_cached_inference": \{ "total_cost": 0.0006090000000000001, "gpt-35-turbo": \{ "cost": 0.0006090000000000001, "prompt_tokens": 242, "completion_tokens": 123, "total_tokens": 365, }, }, "usage_excluding_cached_inference": \{ "total_cost": 0.0006090000000000001, "gpt-35-turbo": \{ "cost": 0.0006090000000000001, "prompt_tokens": 242, "completion_tokens": 123, "total_tokens": 365, }, }, } |