compass.utilities.event_log.ResponseRecorder#

class ResponseRecorder(tracker=None)[source]#

Bases: object

Usage tracker stand-in that remembers the API response metadata

Usage updates are forwarded to the wrapped tracker, if there is one, so token accounting is unchanged.

Methods

update_from_model([model, response, sub_label])

Remember the response details, then forward the update

update_from_model(model=None, response=None, sub_label='default')[source]#

Remember the response details, then forward the update