mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix #I6YSMC [app_chatgpt] 用户Ai对话用量增加最近提问
This commit is contained in:
@@ -170,7 +170,8 @@ GPT-3 A set of models that can understand and generate natural language
|
||||
'ai_completion_tokens': completion_tokens,
|
||||
'tokens_total': total_tokens,
|
||||
'used_number': 1,
|
||||
'first_ask_time': ask_date
|
||||
'first_ask_time': ask_date,
|
||||
'latest_ask_time': ask_date
|
||||
})
|
||||
else:
|
||||
vals = {
|
||||
@@ -178,6 +179,7 @@ GPT-3 A set of models that can understand and generate natural language
|
||||
'ai_completion_tokens': ai_use.ai_completion_tokens + completion_tokens,
|
||||
'tokens_total': ai_use.tokens_total + total_tokens,
|
||||
'used_number': ai_use.used_number + 1,
|
||||
'latest_ask_time': ask_date
|
||||
}
|
||||
if not ai_use.first_ask_time:
|
||||
vals.update({
|
||||
|
||||
Reference in New Issue
Block a user