mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
fix: text的使用量未上报
This commit is contained in:
parent
e26664aa51
commit
45d1c89e45
|
@ -52,6 +52,13 @@ class OpenAIInteract:
|
|||
|
||||
# 请求接口
|
||||
for resp in request:
|
||||
|
||||
if resp['usage']['total_tokens'] > 0:
|
||||
self.audit_mgr.report_text_model_usage(
|
||||
model,
|
||||
resp['usage']['total_tokens']
|
||||
)
|
||||
|
||||
yield resp
|
||||
|
||||
def request_image(self, prompt) -> dict:
|
||||
|
|
Loading…
Reference in New Issue
Block a user