-
Notifications
You must be signed in to change notification settings - Fork 259
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
Independent get_analytics
method
#522
Conversation
- Refactored token cost and duration handling into reusable methods. - Added get_analytics function to allow independent session statistics retrieval. - Improved code readability and modularity.
…patch Refactor Session class and add get_analytics function
This reverts commit 6c12755.
…_analytics` methods
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚨 Try these New Features:
|
This reverts commit 7d31cbb.
When I was writing the documentation, I figured that the current implementation was not effective, since it required a Since it is one of the attributes that a user doesn't need to know about, I refactored the code. The code is more readable and modular, and allows the user an easy way to fetch the analytics. |
This reverts commit 0bc2b05.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
📥 Pull Request
References #437 by using the latest commits.
📘 Description
get_analytics
method to enable its usage independently of the session lifecycleget_analytics
method -_format_duration
and_format_token_cost
for formatting needs and_get_response
for fetching the response from the server.token_cost
andsession_url
as attributes to theSession
class🧪 Testing
get_response
method