This commit is contained in:
2026-11-08 20:08:53 +08:00
parent 7526a5fe4d
commit 9b924747c5
2692 changed files with 394867 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
from odoo.addons.ai.controllers.thread import AIThreadController
class AILivechatThreadController(AIThreadController):
def _get_channel_ai_session(self, channel):
if session := super()._get_channel_ai_session(channel):
return session
if channel.channel_type == 'livechat':
return self.env['ai.session'].sudo().create({
'agent_id': channel.sudo().ai_agent_id.id, 'channel_id': channel.id,
})
return session