mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix chat but
This commit is contained in:
@@ -165,7 +165,10 @@ class Channel(models.Model):
|
||||
sync_config = self.env['ir.config_parameter'].sudo().get_param('app_chatgpt.openai_sync_config')
|
||||
openai.api_key = api_key
|
||||
# 非4版本,取0次。其它取3 次历史
|
||||
chat_count = 0 if '4' in ai.ai_model else 3
|
||||
if '4' in ai.ai_model:
|
||||
chat_count = 1 if self.chat_count > 0 else 0
|
||||
else:
|
||||
chat_count = self.chat_count
|
||||
if author_id != answer_id.id and self.channel_type == 'chat':
|
||||
# 私聊
|
||||
_logger.info(f'私聊:author_id:{author_id},partner_chatgpt.id:{answer_id.id}')
|
||||
|
||||
Reference in New Issue
Block a user