You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* gather_usage_summary has been updated
* updated cost info to 'usage_including_cached_inference' and 'usage_excluding_cached_inference'
* fix: pre-commit formatting for cost_info
* improved cost explanation and doc
* improved cost info doc
* include - exclude
---------
Co-authored-by: Chi Wang <[email protected]>
The value for each usage type is a dictionary containing cost information for that specific type.
31
+
- "usage_including_cached_inference": Cost information on the total usage, including the tokens in cached inference.
32
+
- "usage_excluding_cached_inference": Cost information on the usage of tokens, excluding the tokens in cache. No larger than "usage_including_cached_inference".
33
+
"""
32
34
human_input: List[str] =None
33
35
"""A list of human input solicited during the chat."""
- "usage_including_cached_inference": Cost information on the total usage, including the tokens in cached inference.
38
+
- "usage_excluding_cached_inference": Cost information on the usage of tokens, excluding the tokens in cache. No larger than "usage_including_cached_inference".
37
39
38
40
Example:
39
41
40
42
```python
41
-
total_usage_summary = {
42
-
"total_cost": 0.0006090000000000001,
43
-
"gpt-35-turbo": {
44
-
"cost": 0.0006090000000000001,
45
-
"prompt_tokens": 242,
46
-
"completion_tokens": 123,
47
-
"total_tokens": 365
43
+
{
44
+
"usage_including_cached_inference" : {
45
+
"total_cost": 0.0006090000000000001,
46
+
"gpt-35-turbo": {
47
+
"cost": 0.0006090000000000001,
48
+
"prompt_tokens": 242,
49
+
"completion_tokens": 123,
50
+
"total_tokens": 365
51
+
},
52
+
},
53
+
54
+
"usage_excluding_cached_inference" : {
55
+
"total_cost": 0.0006090000000000001,
56
+
"gpt-35-turbo": {
57
+
"cost": 0.0006090000000000001,
58
+
"prompt_tokens": 242,
59
+
"completion_tokens": 123,
60
+
"total_tokens": 365
61
+
},
48
62
}
49
63
}
50
64
```
51
65
52
66
Note:
53
67
54
-
`actual_usage_summary` follows the same format.
55
-
If none of the agents incurred any cost (not having a client), then the total_usage_summary and actual_usage_summary will be `{'total_cost': 0}`.
68
+
If none of the agents incurred any cost (not having a client), then the usage_including_cached_inference and usage_excluding_cached_inference will be `{'total_cost': 0}`.
0 commit comments