mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
upd
This commit is contained in:
@@ -364,11 +364,11 @@ class Channel(models.Model):
|
|||||||
# if hasattr(channel, 'is_private') and channel.description:
|
# if hasattr(channel, 'is_private') and channel.description:
|
||||||
# messages.append({"role": "system", "content": channel.description})
|
# messages.append({"role": "system", "content": channel.description})
|
||||||
# messages.append({"role": "user", "content": msg})
|
# messages.append({"role": "user", "content": msg})
|
||||||
msg_len = sum(len(str(m)) for m in messages)
|
# msg_len = sum(len(str(m)) for m in messages)
|
||||||
if msg_len * 2 > ai.max_send_char:
|
# if msg_len * 2 > ai.max_send_char:
|
||||||
new_msg = channel.with_user(user_id).message_post(body=_('您所发送的提示词已超长。'), message_type='comment',
|
# new_msg = channel.with_user(user_id).message_post(body=_('您所发送的提示词已超长。'), message_type='comment',
|
||||||
subtype_xmlid='mail.mt_comment',
|
# subtype_xmlid='mail.mt_comment',
|
||||||
parent_id=message.id)
|
# parent_id=message.id)
|
||||||
|
|
||||||
# if msg_len * 2 >= 8000:
|
# if msg_len * 2 >= 8000:
|
||||||
# messages = [{"role": "user", "content": msg}]
|
# messages = [{"role": "user", "content": msg}]
|
||||||
|
|||||||
Reference in New Issue
Block a user