Skip to content

fix usage tracker#252

Closed
mlikasam-askui wants to merge 1 commit intomainfrom
fix/usage-tracker
Closed

fix usage tracker#252
mlikasam-askui wants to merge 1 commit intomainfrom
fix/usage-tracker

Conversation

@mlikasam-askui
Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines -68 to -70
@override
def on_conversation_start(self, conversation: Conversation) -> None:
self._summary = UsageSummary()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was resetting the Usage Summery?

Comment on lines +76 to +79
self._reporter.add_message(
role="Usage Tracker",
content=f"Usage for step {step_index}: {str(result.usage)}",
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this only for debugging?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be removed, as the usage per step is already part of the html report anyways (we log the full message there, which has a "usage" field, see screenshot attached)
image

def model_id(self) -> str:
return self._model_id_value

@property
Copy link
Copy Markdown
Contributor

@philipph-askui philipph-askui Mar 30, 2026

Choose a reason for hiding this comment

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

This will lead to the html reports showing cost when using the askui API. This is something that we do not want as the cost for the users can be completely different when using our API (e.g. when they use free credits.
--> this needs to be removed again

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

was used for debugging
yes, it should be removed

@philipph-askui
Copy link
Copy Markdown
Contributor

Thanks @mlikasam-askui for your quick fix with the usage tracking!!

I integrated this fix here and the usage tracking refactorings from your improve-token-consumption branch into this PR here: #253

Hence, I would recommend to close this PR here. You agree?

@mlikasam-askui
Copy link
Copy Markdown
Contributor Author

Implemented in #253

@mlikasam-askui mlikasam-askui deleted the fix/usage-tracker branch March 31, 2026 10:17
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.

3 participants