Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the cost info easier to read #2356

Merged
merged 9 commits into from
Apr 15, 2024
Merged

Made the cost info easier to read #2356

merged 9 commits into from
Apr 15, 2024

Conversation

Hk669
Copy link
Collaborator

@Hk669 Hk669 commented Apr 11, 2024

Why are these changes needed?

  • Updated the function gathe_usage_summary to return a dictionary containing two dictionaries: total_usage_summary and actual_usage_summary, instead of returning a tuple.

Related issue number

Closes #2336

Checks

@Hk669
Copy link
Collaborator Author

Hk669 commented Apr 11, 2024

@microsoft-github-policy-service agree

Copy link
Contributor

@sonichi sonichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I have some suggestions.

autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@yiranwu0 yiranwu0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check all places that uses gather_usage_summary, there should be a notebook that also uses this function?

@Hk669
Copy link
Collaborator Author

Hk669 commented Apr 11, 2024

@kevin666aa got stuck at a point, if you don't mind, could you please ping me up at discord. username: hrushikesh_d

@yiranwu0
Copy link
Collaborator

username

Sure!

@sonichi
Copy link
Contributor

sonichi commented Apr 14, 2024

How's this PR going? I'll need to address this problem asap. I may make a PR myself if there is no update with this PR by tomorrow.

@sonichi sonichi requested a review from qingyun-wu April 14, 2024 00:51
@Hk669
Copy link
Collaborator Author

Hk669 commented Apr 14, 2024

i need to update all the way from oai/client.py because, it has this method print_usage_summary
if you can give me some specific details about the modification, would be greatly appreciated. thanks @sonichi

would appreciate if you can help me with some more information. @sonichi @kevin666aa

@Hk669 Hk669 requested review from sonichi and yiranwu0 April 14, 2024 07:18
autogen/agentchat/chat.py Outdated Show resolved Hide resolved
autogen/agentchat/chat.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Show resolved Hide resolved
notebook/agentchat_cost_token_tracking.ipynb Outdated Show resolved Hide resolved
@Hk669 Hk669 requested a review from sonichi April 14, 2024 14:21
autogen/agentchat/chat.py Outdated Show resolved Hide resolved
autogen/agentchat/chat.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@Hk669 Hk669 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the doc string as proposed.

autogen/code_utils.py Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
autogen/agentchat/utils.py Outdated Show resolved Hide resolved
@sonichi
Copy link
Contributor

sonichi commented Apr 14, 2024

@kevin666aa could you review again? The PR is blocked by the change request.

Copy link
Collaborator

@yiranwu0 yiranwu0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@giorgossideris
Copy link
Collaborator

Looks good to me too!

@sonichi sonichi added this pull request to the merge queue Apr 15, 2024
Merged via the queue into microsoft:main with commit 59daf78 Apr 15, 2024
60 of 72 checks passed
@sonichi sonichi deleted the cost_info branch April 15, 2024 01:32
jayralencar pushed a commit to jayralencar/autogen that referenced this pull request May 28, 2024
* 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 <wang.chi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Make the cost info easier to read
4 participants