diff --git a/app_deepseek/__init__.py b/app_deepseek/__init__.py
new file mode 100644
index 00000000..d6948c82
--- /dev/null
+++ b/app_deepseek/__init__.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+
+# from . import controllers
+from . import models
diff --git a/app_deepseek/__manifest__.py b/app_deepseek/__manifest__.py
new file mode 100644
index 00000000..926c353c
--- /dev/null
+++ b/app_deepseek/__manifest__.py
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+
+# Created on 2023-09-15
+# author: 欧度智能,https://www.odooai.cn
+# email: 300883@qq.com
+# resource of odooai
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+{
+ 'name': 'Deepseek Ai for odoo ai center, 深度求索Ai支持-对话模型',
+ 'version': '13.0.25.02.07',
+ 'author': 'odooai.cn',
+ 'company': 'odooai.cn',
+ 'maintainer': 'odooai.cn',
+ 'category': 'Website/Website',
+ 'website': 'https://www.odooai.cn',
+ 'live_test_url': 'https://demo.odooapp.cn',
+ 'license': 'LGPL-3',
+ 'sequence': 10,
+ 'license': 'LGPL-3',
+ 'price': 0.00,
+ 'currency': 'EUR',
+ 'images': ['static/description/banner.png'],
+ 'summary': '''
+ Deepseek AI for Odoo AI Center. Ai Aigc Center including Deepseek, Azure Chatgpt Ai, OpenAi Chatgpt Ai.
+ Ai服务中心的DeepSeek支持,包括V3和R1等,本版本只支持开放对话模型。
+ Integration All Ai robot Api, like Azure OpenAI Chatgpt Service.
+ Also support(need extra pay) Ali Ai, Baidu Ai, Kimi Ai.
+ Easy Chat channel with several Ai Robots and train.
+ ''',
+ 'description': '''
+ Chat with Deepseek ai with odoo.
+ Allows the application to leverage the capabilities of the GPT language model to generate human-like responses,
+ providing a more natural and intuitive user experience.
+ odoo Deepseek ai connector.
+ 1. Multi ChatGpt openAI robot Connector. Chat and train.
+ 2. Multi Ai support including Google Bard Ai, Azure Ai, Chatgpt 4, Chatgpt 3.5 Turbo, Chatgpt 3 Davinci, Chatgpt 2 Code Optimized, 'Dall-E Image.
+ 3. Bind ChatGpt Api to user. So we can chat to robot user or use ChatGpt Channel for Group Chat.
+ 4. White and black List for ChatGpt.
+ 5. Setup Demo Chat time for every new user.
+ 6. Easy Start and Stop ChatGpt.
+ 7. Evaluation the ai robot to make better response. This training.
+ 8. Add api support Connect the Microsoft Azure OpenAI Service.
+ 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 18,17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
+ 13. Full Open Source.
+ ''',
+ 'depends': [
+ 'app_chatgpt',
+ ],
+ 'data': [
+ 'data/ai_robot_data.xml',
+ 'data/user_partner_data.xml',
+ 'data/mail_channel_data.xml',
+ 'views/ai_robot_views.xml',
+ ],
+ 'installable': True,
+ 'application': True,
+ 'auto_install': False,
+}
diff --git a/app_deepseek/controllers/__init__.py b/app_deepseek/controllers/__init__.py
new file mode 100644
index 00000000..65a8c120
--- /dev/null
+++ b/app_deepseek/controllers/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import main
diff --git a/app_deepseek/controllers/main.py b/app_deepseek/controllers/main.py
new file mode 100644
index 00000000..217c4d8b
--- /dev/null
+++ b/app_deepseek/controllers/main.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+from odoo import http
+
+
+class ChatgptController(http.Controller):
+ @http.route(['/chatgpt_form'], type='http', auth="public", csrf=False,
+ website=True)
+ def question_submit(self):
+ return http.request.render('app_chatgpt.connector')
diff --git a/app_deepseek/data/ai_robot_data.xml b/app_deepseek/data/ai_robot_data.xml
new file mode 100644
index 00000000..013b4711
--- /dev/null
+++ b/app_deepseek/data/ai_robot_data.xml
@@ -0,0 +1,14 @@
+
+
Please ask me any question.
]]> + + +%s
' % _('Response Timeout, please speak again.')), + ('body', '!=', _('温馨提示:您发送的内容含有敏感词,请修改内容后再向我发送。'))] + if self.channel_type in ['group', 'channel']: + # 群聊增加时间限制,当前找所有人,不限制 author_id + domain = expression.AND([domain, [('date', '>=', afterTime)]]) + else: + domain = expression.AND([domain, [('author_id', '=', answer_id.id)]]) + if chat_count == 0: + ai_msg_list = [] + else: + ai_msg_list = message_model.with_context(tz='UTC').search(domain, order="id asc", limit=chat_count) + for ai_msg in ai_msg_list: + # 判断这个 ai_msg 是不是ai发,有才 insert。 判断 user_msg 是不是 user发的,有才 insert + user_msg = ai_msg.parent_id.sudo() + ai_content = str(ai_msg.body).replace("", "").replace("
", "").replace("", "") + if ai_msg.author_id.sudo().gpt_id and answer_id.sudo().gpt_id and ai_msg.author_id.sudo().gpt_id == answer_id.sudo().gpt_id: + context_history.insert(0, { + 'role': 'assistant', + 'content': ai_content, + }) + if not user_msg.author_id.gpt_id: + user_content = user_msg.body.replace("
", "").replace("
", "").replace('@%s' % answer_id.name, '').lstrip() + context_history.append({ + 'role': 'user', + 'content': user_content, + }) + context_history.append({ + 'role': 'assistant', + 'content': ai_content, + }) + return context_history + else: + return super(Channel, self).get_openai_context(channel_id, author_id, answer_id, minutes, chat_count) diff --git a/app_deepseek/security/odooai.cn b/app_deepseek/security/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_deepseek/static/description/ai_banner.jpg b/app_deepseek/static/description/ai_banner.jpg new file mode 100644 index 00000000..45b4dea4 Binary files /dev/null and b/app_deepseek/static/description/ai_banner.jpg differ diff --git a/app_deepseek/static/description/apply1.jpg b/app_deepseek/static/description/apply1.jpg new file mode 100644 index 00000000..4284a5a5 Binary files /dev/null and b/app_deepseek/static/description/apply1.jpg differ diff --git a/app_deepseek/static/description/apply2.jpg b/app_deepseek/static/description/apply2.jpg new file mode 100644 index 00000000..fe900d1f Binary files /dev/null and b/app_deepseek/static/description/apply2.jpg differ diff --git a/app_deepseek/static/description/apply3.jpg b/app_deepseek/static/description/apply3.jpg new file mode 100644 index 00000000..957963b7 Binary files /dev/null and b/app_deepseek/static/description/apply3.jpg differ diff --git a/app_deepseek/static/description/apply4.jpg b/app_deepseek/static/description/apply4.jpg new file mode 100644 index 00000000..d8d02f84 Binary files /dev/null and b/app_deepseek/static/description/apply4.jpg differ diff --git a/app_deepseek/static/description/apply5.jpg b/app_deepseek/static/description/apply5.jpg new file mode 100644 index 00000000..546d4340 Binary files /dev/null and b/app_deepseek/static/description/apply5.jpg differ diff --git a/app_deepseek/static/description/apply6.jpg b/app_deepseek/static/description/apply6.jpg new file mode 100644 index 00000000..16be46f7 Binary files /dev/null and b/app_deepseek/static/description/apply6.jpg differ diff --git a/app_deepseek/static/description/apply7.jpg b/app_deepseek/static/description/apply7.jpg new file mode 100644 index 00000000..0e06f916 Binary files /dev/null and b/app_deepseek/static/description/apply7.jpg differ diff --git a/app_deepseek/static/description/baidu.png b/app_deepseek/static/description/baidu.png new file mode 100644 index 00000000..1d2cce7a Binary files /dev/null and b/app_deepseek/static/description/baidu.png differ diff --git a/app_deepseek/static/description/banner.gif b/app_deepseek/static/description/banner.gif new file mode 100644 index 00000000..644457bd Binary files /dev/null and b/app_deepseek/static/description/banner.gif differ diff --git a/app_deepseek/static/description/banner.png b/app_deepseek/static/description/banner.png new file mode 100644 index 00000000..0db28b4f Binary files /dev/null and b/app_deepseek/static/description/banner.png differ diff --git a/app_deepseek/static/description/bard.gif b/app_deepseek/static/description/bard.gif new file mode 100644 index 00000000..78de3734 Binary files /dev/null and b/app_deepseek/static/description/bard.gif differ diff --git a/app_deepseek/static/description/chatgpt.png b/app_deepseek/static/description/chatgpt.png new file mode 100644 index 00000000..20a03f9d Binary files /dev/null and b/app_deepseek/static/description/chatgpt.png differ diff --git a/app_deepseek/static/description/chatgpt4_azure.png b/app_deepseek/static/description/chatgpt4_azure.png new file mode 100644 index 00000000..8f24124c Binary files /dev/null and b/app_deepseek/static/description/chatgpt4_azure.png differ diff --git a/app_deepseek/static/description/chatgpt_blue.png b/app_deepseek/static/description/chatgpt_blue.png new file mode 100644 index 00000000..1e94178f Binary files /dev/null and b/app_deepseek/static/description/chatgpt_blue.png differ diff --git a/app_deepseek/static/description/chatgpt_green.jpg b/app_deepseek/static/description/chatgpt_green.jpg new file mode 100644 index 00000000..f3350c62 Binary files /dev/null and b/app_deepseek/static/description/chatgpt_green.jpg differ diff --git a/app_deepseek/static/description/demo01.jpg b/app_deepseek/static/description/demo01.jpg new file mode 100644 index 00000000..04203aa3 Binary files /dev/null and b/app_deepseek/static/description/demo01.jpg differ diff --git a/app_deepseek/static/description/demo02.jpg b/app_deepseek/static/description/demo02.jpg new file mode 100644 index 00000000..9198bb82 Binary files /dev/null and b/app_deepseek/static/description/demo02.jpg differ diff --git a/app_deepseek/static/description/demo03.jpg b/app_deepseek/static/description/demo03.jpg new file mode 100644 index 00000000..f8f05ac6 Binary files /dev/null and b/app_deepseek/static/description/demo03.jpg differ diff --git a/app_deepseek/static/description/demo04.jpg b/app_deepseek/static/description/demo04.jpg new file mode 100644 index 00000000..0051ee1d Binary files /dev/null and b/app_deepseek/static/description/demo04.jpg differ diff --git a/app_deepseek/static/description/demo1.jpg b/app_deepseek/static/description/demo1.jpg new file mode 100644 index 00000000..ff7e66d4 Binary files /dev/null and b/app_deepseek/static/description/demo1.jpg differ diff --git a/app_deepseek/static/description/demo2.jpg b/app_deepseek/static/description/demo2.jpg new file mode 100644 index 00000000..c1fad2d0 Binary files /dev/null and b/app_deepseek/static/description/demo2.jpg differ diff --git a/app_deepseek/static/description/demo3.jpg b/app_deepseek/static/description/demo3.jpg new file mode 100644 index 00000000..427f8b90 Binary files /dev/null and b/app_deepseek/static/description/demo3.jpg differ diff --git a/app_deepseek/static/description/demo4.jpg b/app_deepseek/static/description/demo4.jpg new file mode 100644 index 00000000..b83102fa Binary files /dev/null and b/app_deepseek/static/description/demo4.jpg differ diff --git a/app_deepseek/static/description/demo5.jpg b/app_deepseek/static/description/demo5.jpg new file mode 100644 index 00000000..c8f3ffd6 Binary files /dev/null and b/app_deepseek/static/description/demo5.jpg differ diff --git a/app_deepseek/static/description/demo6.jpg b/app_deepseek/static/description/demo6.jpg new file mode 100644 index 00000000..af62be26 Binary files /dev/null and b/app_deepseek/static/description/demo6.jpg differ diff --git a/app_deepseek/static/description/demo7.jpg b/app_deepseek/static/description/demo7.jpg new file mode 100644 index 00000000..d65a8b2a Binary files /dev/null and b/app_deepseek/static/description/demo7.jpg differ diff --git a/app_deepseek/static/description/demo71.jpg b/app_deepseek/static/description/demo71.jpg new file mode 100644 index 00000000..a5c83ab2 Binary files /dev/null and b/app_deepseek/static/description/demo71.jpg differ diff --git a/app_deepseek/static/description/demo8.jpg b/app_deepseek/static/description/demo8.jpg new file mode 100644 index 00000000..e17bab42 Binary files /dev/null and b/app_deepseek/static/description/demo8.jpg differ diff --git a/app_deepseek/static/description/demo81.jpg b/app_deepseek/static/description/demo81.jpg new file mode 100644 index 00000000..cf73a540 Binary files /dev/null and b/app_deepseek/static/description/demo81.jpg differ diff --git a/app_deepseek/static/description/demo9.jpg b/app_deepseek/static/description/demo9.jpg new file mode 100644 index 00000000..e8760f93 Binary files /dev/null and b/app_deepseek/static/description/demo9.jpg differ diff --git a/app_deepseek/static/description/demo91.jpg b/app_deepseek/static/description/demo91.jpg new file mode 100644 index 00000000..ccad6d14 Binary files /dev/null and b/app_deepseek/static/description/demo91.jpg differ diff --git a/app_deepseek/static/description/demo_deepseek.jpg b/app_deepseek/static/description/demo_deepseek.jpg new file mode 100644 index 00000000..85495a94 Binary files /dev/null and b/app_deepseek/static/description/demo_deepseek.jpg differ diff --git a/app_deepseek/static/description/demoa.jpg b/app_deepseek/static/description/demoa.jpg new file mode 100644 index 00000000..02e4e950 Binary files /dev/null and b/app_deepseek/static/description/demoa.jpg differ diff --git a/app_deepseek/static/description/demob.jpg b/app_deepseek/static/description/demob.jpg new file mode 100644 index 00000000..9d845f51 Binary files /dev/null and b/app_deepseek/static/description/demob.jpg differ diff --git a/app_deepseek/static/description/icon.png b/app_deepseek/static/description/icon.png new file mode 100644 index 00000000..e8a67144 Binary files /dev/null and b/app_deepseek/static/description/icon.png differ diff --git a/app_deepseek/static/description/index.html b/app_deepseek/static/description/index.html new file mode 100644 index 00000000..e2ef618d --- /dev/null +++ b/app_deepseek/static/description/index.html @@ -0,0 +1,322 @@ + + + + +
+
+
+
+
+ Input your api key, And Select the api model you need to use.
+
+ You can set the Temperature higer for more creative answer.
+
+
+ You can set the Temperature higer for more creative answer.
+
+
+
+
+
+
+
+
+ With Evaluation, you can make your ai robot more smart. +
+
+
+
+ Api From Azure, please read
+https://www.odooai.cn/blog/odoo-install-deploy-6/chatgpt4-china-application-chatgpt3-5-free-one-year-microsoft-azure-openai-api-registration-tutorial-odoo-aicenter-integration-28
+ +Api For deepseek, please follow
+
+
+
+ As openai change the api often, sometime you need to check
+https://platform.openai.com/docs/introduction
+
+
+
+
+