autogen
autogen.gather_usage_summary
gather_usage_summary
Gather usage summary from all agents.
Parameters:Name | Description |
---|---|
agents | (list): List of agents. Type: list[autogen.Agent] |
Type | Description |
---|---|
dict[dict[str, dict], dict[str, dict]] | 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, }, }, } |