upgrade chatgpt translator.

This commit is contained in:
Chill
2023-09-26 18:46:28 +08:00
parent 92e24abc43
commit ff8969bd8a
3 changed files with 11 additions and 6 deletions

View File

@@ -241,7 +241,7 @@ class Channel(models.Model):
# elif user_id.gpt_id and not is_allow:
# # 暂时有限用户的Ai
# raise UserError(_('此Ai暂时未开放请联系管理员。'))
if hasattr(ai, 'is_translator') and ai.is_translator:
if hasattr(ai, 'is_translator') and ai.is_translator and ai.ai_model == 'translator':
return rdata
chatgpt_channel_id = self.env.ref('app_chatgpt.channel_chatgpt')