mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix #I6RFA0 [app_chat_gpt]异步处理,当前有问题
This commit is contained in:
@@ -46,6 +46,7 @@ class Channel(models.Model):
|
|||||||
|
|
||||||
def get_ai(self, ai, prompt, partner_name, channel, user_id, message):
|
def get_ai(self, ai, prompt, partner_name, channel, user_id, message):
|
||||||
res = ai.get_ai(prompt, partner_name)
|
res = ai.get_ai(prompt, partner_name)
|
||||||
|
if res:
|
||||||
res = res.replace('\n', '<br/>')
|
res = res.replace('\n', '<br/>')
|
||||||
channel.with_user(user_id).message_post(body=res, message_type='comment', subtype_xmlid='mail.mt_comment', parent_id=message.id)
|
channel.with_user(user_id).message_post(body=res, message_type='comment', subtype_xmlid='mail.mt_comment', parent_id=message.id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user