refactor: 修复database单例多次初始化的问题,改变instance默认返回实例的类型,缩短db相关函数调用时的object名

This commit is contained in:
Rikki
2025-03-12 00:51:56 +08:00
parent 7c4d3ec3fb
commit 39018440d7
17 changed files with 88 additions and 117 deletions

View File

@@ -53,7 +53,7 @@ class LLMStatistics:
"costs_by_model": defaultdict(float)
}
cursor = self.db.db.llm_usage.find({
cursor = self.db.llm_usage.find({
"timestamp": {"$gte": start_time}
})