Skip to content

Conversation

@denverbaumgartner
Copy link
Contributor

Description

Utilize callbacks to track token usage through litellm. Currently implemented for single tracker use (for example, does not work when batching in DocGeneratorEvaluator), works in simpler multi-threaded contexts.

Related Issue

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Ran against test suite and build checks. Tested in graphdoc-server.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@denverbaumgartner denverbaumgartner merged commit 6cfb015 into main Mar 14, 2025
1 check passed
@denverbaumgartner denverbaumgartner deleted the tokens branch March 14, 2025 19:55
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.

2 participants