[UPD] app_chatgpt 15.0

This commit is contained in:
Chill
2024-04-24 18:56:55 +08:00
parent d26b55cde3
commit e533269196
6 changed files with 15 additions and 14 deletions

View File

@@ -10,7 +10,7 @@
{ {
'name': 'ChatGPT4, China Ali,AiGC Center.Ai服务中心聚合全网Ai', 'name': 'ChatGPT4, China Ali,AiGC Center.Ai服务中心聚合全网Ai',
'version': '16.23.09.22', 'version': '15.24.04.24',
'author': 'odooai.cn', 'author': 'odooai.cn',
'company': 'odooai.cn', 'company': 'odooai.cn',
'maintainer': 'odooai.cn', 'maintainer': 'odooai.cn',
@@ -40,7 +40,7 @@
9. Can set Synchronous or Asynchronous mode for Ai response. 9. Can set Synchronous or Asynchronous mode for Ai response.
10.Filter Sensitive Words Setup. 10.Filter Sensitive Words Setup.
11. Multi-language Support. Multi-Company Support. 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. 13. Full Open Source.
''', ''',
'depends': [ 'depends': [
@@ -48,7 +48,6 @@
'app_odoo_customize', 'app_odoo_customize',
'base_setup', 'base_setup',
'mail', 'mail',
'queue_job',
], ],
'data': [ 'data': [
'security/ir.model.access.csv', 'security/ir.model.access.csv',

View File

@@ -24,7 +24,8 @@ class AiRobot(models.Model):
# update ai_robot set ai_model=set_ai_model # update ai_robot set ai_model=set_ai_model
ai_model = fields.Char(string="AI Model", required=True, default='auto', help='Customize input') ai_model = fields.Char(string="AI Model", required=True, default='auto', help='Customize input')
set_ai_model = fields.Selection(string="Quick Set Model", selection=[ 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-3.5-turbo-16k-0613', 'gpt-3.5-turbo-16k-0613(Big text)'),
('gpt-4', 'Chatgpt 4'), ('gpt-4', 'Chatgpt 4'),
('gpt-4-32k', 'Chatgpt 4 32k'), ('gpt-4-32k', 'Chatgpt 4 32k'),
@@ -34,7 +35,7 @@ class AiRobot(models.Model):
('code-davinci-002', 'Chatgpt 2 Code Optimized'), ('code-davinci-002', 'Chatgpt 2 Code Optimized'),
('text-davinci-002', 'Chatgpt 2 Davinci'), ('text-davinci-002', 'Chatgpt 2 Davinci'),
('dall-e2', 'Dall-E Image'), ('dall-e2', 'Dall-E Image'),
], default='gpt-3.5-turbo-0613', ], default='gpt-3.5-turbo-0125',
help=""" help="""
GPT-4: Can understand Image, generate natural language or code. 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 GPT-3.5: A set of models that improve on GPT-3 and can understand as well as generate natural language or code

View File

@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import openai import openai
import logging
import requests, json import requests, json
import datetime import datetime
# from transformers import TextDavinciTokenizer, TextDavinciModel # from transformers import TextDavinciTokenizer, TextDavinciModel
@@ -9,7 +10,7 @@ from odoo.exceptions import UserError
from odoo.osv import expression from odoo.osv import expression
from odoo.addons.app_common.models.base import get_ua_type from odoo.addons.app_common.models.base import get_ua_type
import logging
_logger = logging.getLogger(__name__) _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 msg = _("Please warmly welcome our new partner %s and send him the best wishes.") % message.author_id.name
else: else:
# 不能用 preview 如果用 : 提示词则 preview信息丢失 # 不能用 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() msg = plaintext_ct.replace('@%s' % answer_id.name, '').lstrip()
if not msg: if not msg:

View File

@@ -4,14 +4,14 @@
<h2 class="oe_slogan"> Latest ChatGPT AI Center. GPT 3.5, Ali Ai, Baidu Ai, Multi Robot Support. Chat and Training </h2> <h2 class="oe_slogan"> Latest ChatGPT AI Center. GPT 3.5, Ali Ai, Baidu Ai, Multi Robot Support. Chat and Training </h2>
<h3 class="oe_slogan"> Support chatgpt 4 32k. 3.5 turbo, text-davinci, Integration All ChatGpt Api. </h3> <h3 class="oe_slogan"> Support chatgpt 4 32k. 3.5 turbo, text-davinci, Integration All ChatGpt Api. </h3>
<div class="oe_row"> <div class="oe_row">
<h3>Lastest update: v16.23.09.22</h3> <h3>Latest update: v15.24.04.24</h3>
<div class="row"> <div class="row">
<div class="row"> <div class="row">
Add Alibaba Qwen support(search 'app_ai_ali'), update chatgpt api Add Alibaba Qwen support(search 'app_ai_ali'), update chatgpt api
</div> </div>
<img class="oe_demo oe_screenshot img img-fluid" src="demo02.jpg"> <img class="oe_demo oe_screenshot img img-fluid" src="demo02.jpg">
</div> </div>
<h3>Lastest update: v16.23.03.16</h3> <h3>Latest update: v15.23.03.16</h3>
<div class="row"> <div class="row">
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png"> <img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
</div> </div>
@@ -65,7 +65,7 @@
</li> </li>
<li> <li>
<i class="fa fa-check-square-o text-primary"></i> <i class="fa fa-check-square-o text-primary"></i>
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.
</li> </li>
<li> <li>
<i class="fa fa-check-square-o text-primary"></i> <i class="fa fa-check-square-o text-primary"></i>
@@ -111,7 +111,7 @@
<div class="oe_demo oe_screenshot img img-fluid"> <div class="oe_demo oe_screenshot img img-fluid">
<img src="demo1.jpg"/> <img src="demo1.jpg"/>
</div> </div>
<p> You can set the Temperature higer for more creative answer.</p> <p> You can set the Temperature higher for more creative answer.</p>
<div class="oe_demo oe_screenshot img img-fluid"> <div class="oe_demo oe_screenshot img img-fluid">
<img src="demo2.jpg"/> <img src="demo2.jpg"/>
</div> </div>

View File

@@ -19,10 +19,10 @@
<label class="col-4" string="Timout then disconnect(s)" for="openapi_context_timeout"/> <label class="col-4" string="Timout then disconnect(s)" for="openapi_context_timeout"/>
<field name="openapi_context_timeout" title="After timeout seconds then Disconnect" style="width: 200px !important;"/>Seconds <field name="openapi_context_timeout" title="After timeout seconds then Disconnect" style="width: 200px !important;"/>Seconds
</div> </div>
<div class="row mt0"> <!-- <div class="row mt0">
<label class="col-4" for="openai_sync_config"/> <label class="col-4" for="openai_sync_config"/>
<field name="openai_sync_config" style="width: 200px !important;"/> <field name="openai_sync_config" style="width: 200px !important;"/>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -32,7 +32,7 @@
<xpath expr="//field[@name='name']" position="after"> <xpath expr="//field[@name='name']" position="after">
<field name="gpt_id"/> <field name="gpt_id"/>
</xpath> </xpath>
<xpath expr="//filter[@name='filter_no_share']" position="before"> <xpath expr="//filter[@name='no_share']" position="before">
<filter name="is_robot" string="Ai User" domain="[('gpt_id','!=',False)]"/> <filter name="is_robot" string="Ai User" domain="[('gpt_id','!=',False)]"/>
<filter name="not_robot" string="Not Ai" domain="[('gpt_id','=',False)]"/> <filter name="not_robot" string="Not Ai" domain="[('gpt_id','=',False)]"/>
<separator/> <separator/>