This commit is contained in:
ivan deng
2023-04-18 05:51:55 +08:00
parent 845358621f
commit c47f000bfc
3 changed files with 4 additions and 1 deletions

View File

@@ -131,6 +131,9 @@ class Channel(models.Model):
answer_id = user_id.partner_id
if gpt_policy == 'all' or (gpt_policy == 'limit' and is_allow):
ai = user_id.gpt_id
elif user_id.gpt_id and not is_allow:
# 暂时有限用户的Ai
raise UserError(_('此Ai暂时未开放请联系管理员。'))
chatgpt_channel_id = self.env.ref('app_chatgpt.channel_chatgpt')