-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Independent
get_analytics
method (#522)
* Refactor Session class and add get_analytics function - Refactored token cost and duration handling into reusable methods. - Added get_analytics function to allow independent session statistics retrieval. - Improved code readability and modularity. * run black on session.py * update with the latest commit * merge `session.py` from `upstream/origin` * Revert "merge `session.py` from `upstream/origin`" This reverts commit 6c12755. * add `_format_duration`, `get_response`, `_format_token_cost` and `get_analytics` methods * add test for a single session * linting * Revert "linting" This reverts commit 7d31cbb. * add test for multiple sessions * little cleanup * refactored `Session` for a more intuitive approach with complete documentation * refactored to reflect changes in `session.py` * linting * update docs and clean a little * fix code group * fix scripts path * Revert "fix scripts path" This reverts commit 0bc2b05. * add output for the given code --------- Co-authored-by: Dragutin Oreški <[email protected]>
- Loading branch information
1 parent
517c93e
commit 882f371
Showing
3 changed files
with
230 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.