mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-26 03:44:58 +08:00
fix: 修复错误的使用量计算方式
This commit is contained in:
@@ -38,8 +38,10 @@ class OpenAIInteract:
|
||||
**config.completion_api_params
|
||||
)
|
||||
|
||||
logging.debug("OpenAI response: %s", response)
|
||||
|
||||
self.audit_mgr.report_text_model_usage(config.completion_api_params['model'],
|
||||
prompt + response['choices'][0]['text'])
|
||||
response['usage']['total_tokens'])
|
||||
|
||||
return response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user