From e533269196eaa2886d3f6b0bf5d75f2e6fdf9b3d Mon Sep 17 00:00:00 2001 From: Chill Date: Wed, 24 Apr 2024 18:56:55 +0800 Subject: [PATCH] [UPD] app_chatgpt 15.0 --- app_chatgpt/__manifest__.py | 5 ++--- app_chatgpt/models/ai_robot.py | 5 +++-- app_chatgpt/models/mail_channel.py | 5 +++-- app_chatgpt/static/description/index.html | 8 ++++---- app_chatgpt/views/res_config_settings_views.xml | 4 ++-- app_chatgpt/views/res_users_views.xml | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app_chatgpt/__manifest__.py b/app_chatgpt/__manifest__.py index fe683000..85df6c7f 100644 --- a/app_chatgpt/__manifest__.py +++ b/app_chatgpt/__manifest__.py @@ -10,7 +10,7 @@ { 'name': 'ChatGPT4, China Ali,AiGC Center.Ai服务中心,聚合全网Ai', - 'version': '16.23.09.22', + 'version': '15.24.04.24', 'author': 'odooai.cn', 'company': 'odooai.cn', 'maintainer': 'odooai.cn', @@ -40,7 +40,7 @@ 9. Can set Synchronous or Asynchronous mode for Ai response. 10.Filter Sensitive Words Setup. 11. Multi-language Support. Multi-Company Support. - 12. Support Odoo 16,15,14,13,12, Enterprise and Community and odoo.sh Edition. + 12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition. 13. Full Open Source. ''', 'depends': [ @@ -48,7 +48,6 @@ 'app_odoo_customize', 'base_setup', 'mail', - 'queue_job', ], 'data': [ 'security/ir.model.access.csv', diff --git a/app_chatgpt/models/ai_robot.py b/app_chatgpt/models/ai_robot.py index 9be94c85..34c957e2 100644 --- a/app_chatgpt/models/ai_robot.py +++ b/app_chatgpt/models/ai_robot.py @@ -24,7 +24,8 @@ class AiRobot(models.Model): # update ai_robot set ai_model=set_ai_model ai_model = fields.Char(string="AI Model", required=True, default='auto', help='Customize input') set_ai_model = fields.Selection(string="Quick Set Model", selection=[ - ('gpt-3.5-turbo-0613', 'gpt-3.5-turbo-0613(Default and Latest)'), + ('gpt-3.5-turbo-0125', 'gpt-3.5-turbo-0125(Default and Latest)'), + ('gpt-3.5-turbo-0613', 'gpt-3.5-turbo-0613'), ('gpt-3.5-turbo-16k-0613', 'gpt-3.5-turbo-16k-0613(Big text)'), ('gpt-4', 'Chatgpt 4'), ('gpt-4-32k', 'Chatgpt 4 32k'), @@ -34,7 +35,7 @@ class AiRobot(models.Model): ('code-davinci-002', 'Chatgpt 2 Code Optimized'), ('text-davinci-002', 'Chatgpt 2 Davinci'), ('dall-e2', 'Dall-E Image'), - ], default='gpt-3.5-turbo-0613', + ], default='gpt-3.5-turbo-0125', help=""" GPT-4: Can understand Image, generate natural language or code. GPT-3.5: A set of models that improve on GPT-3 and can understand as well as generate natural language or code diff --git a/app_chatgpt/models/mail_channel.py b/app_chatgpt/models/mail_channel.py index 45f69028..195e0601 100644 --- a/app_chatgpt/models/mail_channel.py +++ b/app_chatgpt/models/mail_channel.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import openai +import logging import requests, json import datetime # from transformers import TextDavinciTokenizer, TextDavinciModel @@ -9,7 +10,7 @@ from odoo.exceptions import UserError from odoo.osv import expression from odoo.addons.app_common.models.base import get_ua_type -import logging + _logger = logging.getLogger(__name__) @@ -249,7 +250,7 @@ class Channel(models.Model): msg = _("Please warmly welcome our new partner %s and send him the best wishes.") % message.author_id.name else: # 不能用 preview, 如果用 : 提示词则 preview信息丢失 - plaintext_ct = tools.html_to_inner_content(message.body) + plaintext_ct = tools.html2plaintext(message.body) msg = plaintext_ct.replace('@%s' % answer_id.name, '').lstrip() if not msg: diff --git a/app_chatgpt/static/description/index.html b/app_chatgpt/static/description/index.html index 9133efee..04dab325 100644 --- a/app_chatgpt/static/description/index.html +++ b/app_chatgpt/static/description/index.html @@ -4,14 +4,14 @@

Latest ChatGPT AI Center. GPT 3.5, Ali Ai, Baidu Ai, Multi Robot Support. Chat and Training

Support chatgpt 4 32k. 3.5 turbo, text-davinci, Integration All ChatGpt Api.

-

Lastest update: v16.23.09.22

+

Latest update: v15.24.04.24

Add Alibaba Qwen support(search 'app_ai_ali'), update chatgpt api
-

Lastest update: v16.23.03.16

+

Latest update: v15.23.03.16

@@ -65,7 +65,7 @@
  • - 12. Support Odoo 16,15,14,13,12, Enterprise and Community and odoo.sh Edition. + 12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
  • @@ -111,7 +111,7 @@
    -

    You can set the Temperature higer for more creative answer.

    +

    You can set the Temperature higher for more creative answer.

    diff --git a/app_chatgpt/views/res_config_settings_views.xml b/app_chatgpt/views/res_config_settings_views.xml index af63c05a..dd4b8581 100644 --- a/app_chatgpt/views/res_config_settings_views.xml +++ b/app_chatgpt/views/res_config_settings_views.xml @@ -19,10 +19,10 @@
  • -
    +
    diff --git a/app_chatgpt/views/res_users_views.xml b/app_chatgpt/views/res_users_views.xml index f1664e1e..ada305c6 100644 --- a/app_chatgpt/views/res_users_views.xml +++ b/app_chatgpt/views/res_users_views.xml @@ -32,7 +32,7 @@ - +