MCPcopy Create free account
hub / github.com/KnowledgeXLab/LeanRAG / reset_token_cost

Method reset_token_cost

tools/utils.py:158–161  ·  view source on GitHub ↗

重置总的token消耗和API调用次数

(self)

Source from the content-addressed store, hash-verified

156 for port, gpu in zip(self.ports, self.gpus):
157 self.instances.append({"port": port, "load": 0})
158 def reset_token_cost(self):
159 """重置总的token消耗和API调用次数"""
160 self.TOTAL_TOKEN_COST = 0
161 self.TOTAL_API_CALL_COST = 0
162 def get_tokens_cosumption(self):
163
164 return self.TOTAL_TOKEN_COST, self.TOTAL_API_CALL_COST

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected