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

@@ -64,7 +64,7 @@
</record>
<record id="partner_chatgpt4_azure" model="res.partner">
<field name="name">ChatGPT4 Azure</field>
<field name="image_1920" type="base64" file="app_chatgpt/static/description/chatgpt_blue.png"/>
<field name="image_1920" type="base64" file="app_chatgpt/static/description/chatgpt4_azure.png"/>
</record>
<record id="user_chatgpt4_azure" model="res.users">

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')

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB