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

Added: Operator overloads for Request Usage #4864

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rohanthacker
Copy link
Contributor

Why are these changes needed?

This PR adds the operator overloads for __add__ and __iadd__ for the Request Usage class.

Currently we track usage via the _add_usage function that is part of the open_ai module in autogen-ext. Considering this feature is needed by all model clients adding these methods to the class directly allows for re-use in other classes.

Related issue number

Extends upon the conversation in #4770

Checks

@rohanthacker
Copy link
Contributor Author

@jackgerrits @gziz Hello, I've implement this based upon the conversation in #4770. I've opened this as draft for feedback.
Once discussed I'll be happy update this PR with the updated open_ai client. I've completed this locally and all the tests are passing.

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.

1 participant