Merge branch '18.0' of github.com:guohuadeng/app-odoo into 18.0

This commit is contained in:
Chill
2025-02-10 18:04:44 +08:00
28 changed files with 398 additions and 209 deletions

View File

@@ -42,7 +42,7 @@
11. Multi-language Support. Multi-Company Support. 11. Multi-language Support. Multi-Company Support.
12. Support Odoo 18,17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition. 12. Support Odoo 18,17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
13. Full Open Source. 13. Full Open Source.
To install or upgrade: To install or upgrade:
pip install openai==1.59.5 pip install openai==1.59.5
pip3 install typing-extensions==4.12.2 pip3 install typing-extensions==4.12.2

View File

@@ -1,13 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data noupdate="1"> <data noupdate="1">
<record model="discuss.channel" id="channel_chatgpt"> <record id="channel_chatgpt" model="discuss.channel">
<field name="name">ChatGPT Group Chat</field> <field name="name">ChatGPT Group Chat</field>
<field name="description">ChatGPT话题</field> <field name="description">ChatGPT话题</field>
<field name="image_128" type="base64" file="app_chatgpt/static/description/chatgpt.png"/> <field name="image_128" type="base64" file="app_chatgpt/static/description/chatgpt.png"/>
</record> </record>
<record id="channel_ai_conversation" model="discuss.channel">
<field name="name">Ai Conversation Group</field>
<field name="description">Ai互怼/辩论/二人转</field>
<field name="image_128" type="base64" file="app_chatgpt/static/img/icon_odooai.png"/>
<field name="image_128" type="base64" file="app_chatgpt/static/img/icon_odooai.png"/>
</record>
<record model="mail.message" id="module_install_notification"> </data>
<data noupdate="1">
<record id="app_chatgpt.channel_chatgpt" model="discuss.channel">
<field name="group_ids" eval="[Command.link(ref('base.group_user'))]"/>
</record>
<record id="app_chatgpt.channel_ai_conversation" model="discuss.channel">
<field name="group_ids" eval="[Command.link(ref('base.group_user'))]"/>
</record>
<record id="module_install_notification" model="mail.message">
<field name="model">discuss.channel</field> <field name="model">discuss.channel</field>
<field name="res_id" ref="app_chatgpt.channel_chatgpt"/> <field name="res_id" ref="app_chatgpt.channel_chatgpt"/>
<field name="message_type">email</field> <field name="message_type">email</field>
@@ -16,9 +32,5 @@
<field name="body"><![CDATA[<p>Welcome to ChatGPT Group Chat.</p> <field name="body"><![CDATA[<p>Welcome to ChatGPT Group Chat.</p>
<p>Please ask me any question.</p>]]></field> <p>Please ask me any question.</p>]]></field>
</record> </record>
<record model="discuss.channel" id="app_chatgpt.channel_chatgpt">
<field name="group_ids" eval="[Command.link(ref('base.group_user'))]"/>
</record>
</data> </data>
</odoo> </odoo>

View File

@@ -4,10 +4,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 16.0+e-20230721\n" "Project-Id-Version: Odoo Server 16.0+e-20241226\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-11 08:30+0000\n" "POT-Creation-Date: 2025-02-07 15:24+0000\n"
"PO-Revision-Date: 2023-10-11 08:30+0000\n" "PO-Revision-Date: 2025-02-07 15:24+0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -75,7 +75,8 @@ msgid ""
" so it counts against the overall token limit.\n" " so it counts against the overall token limit.\n"
" " " "
msgstr "" msgstr ""
"Ai角色场景设定。为Ai设定角色和场景后Ai即可按你设定要求进行回答。你可以让Ai专注某领域回答描述Ai个性。并告诉Ai应该回答什么不应该回答什么并告诉他以何种格式响应。角色设定会计入整体的会话Token限制和数量。" "Ai角色场景设定。为Ai设定角色和场景后Ai即可按你设定要求进行回答。你可以让Ai专注某领域回答描述Ai个性。"
"并告诉Ai应该回答什么不应该回答什么并告诉他以何种格式响应。角色设定会计入整体的会话Token限制和数量。"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_ai_robot__top_p #: model:ir.model.fields,help:app_chatgpt.field_ai_robot__top_p
@@ -105,6 +106,7 @@ msgstr "停止标识。表示聊天机器人停止生成回复的条件,可以
#: model:ir.model.fields,help:app_chatgpt.field_ai_robot__set_ai_model #: model:ir.model.fields,help:app_chatgpt.field_ai_robot__set_ai_model
msgid "" msgid ""
"\n" "\n"
"GPT-4o: It is multimodal (accepting text or image inputs and outputting text), and it has the same high intelligence as GPT-4 Turbo but is much more efficient—it generates text 2x faster and is 50% cheaper.\n"
"GPT-4: Can understand Image, generate natural language or code.\n" "GPT-4: Can understand Image, generate natural language or code.\n"
"GPT-3.5: A set of models that improve on GPT-3 and can understand as well as generate natural language or code\n" "GPT-3.5: A set of models that improve on GPT-3 and can understand as well as generate natural language or code\n"
"DALL·E: A model that can generate and edit images given a natural language prompt\n" "DALL·E: A model that can generate and edit images given a natural language prompt\n"
@@ -116,6 +118,7 @@ msgid ""
" " " "
msgstr "" msgstr ""
"\n" "\n"
"GPT-4o: 多模态引擎 (接受文本或图像输入并输出文本,但暂未开放)并且它具有与GPT-4 Turbo 相同的高智能但效率更高——生成文本的速度快2倍且成本降低50%。\n"
"GPT-4: 最新引擎,更好的智能回复。支持多模态输入如图片,但暂时没开放。\n" "GPT-4: 最新引擎,更好的智能回复。支持多模态输入如图片,但暂时没开放。\n"
"GPT-3.5: 问答引擎,可以根据提问回复答案或者代码。\n" "GPT-3.5: 问答引擎,可以根据提问回复答案或者代码。\n"
"DALL·E: 根据要求生成图片。\n" "DALL·E: 根据要求生成图片。\n"
@@ -131,14 +134,14 @@ msgid "#Partner"
msgstr "Ai员工绑定" msgstr "Ai员工绑定"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__frequency_penalty #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__frequency_penalty
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__set_frequency_penalty #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__set_frequency_penalty
msgid "-2~2值越大越少使用常用词" msgid "-2~2值越大越少使用常用词"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__presence_penalty #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__presence_penalty
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__set_presence_penalty #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__set_presence_penalty
msgid "-2~2值越大越少重复词" msgid "-2~2值越大越少重复词"
msgstr "" msgstr ""
@@ -150,7 +153,7 @@ msgid "-mark"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__set_top_p #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__set_top_p
msgid "0-1值越大越倾向大众化的连贯思维" msgid "0-1值越大越倾向大众化的连贯思维"
msgstr "" msgstr ""
@@ -170,7 +173,7 @@ msgid "0-1值越大越少重复词"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__set_temperature #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__set_temperature
msgid "0-21值越大越富有想像力越小则越保守" msgid "0-21值越大越富有想像力越小则越保守"
msgstr "" msgstr ""
@@ -180,7 +183,7 @@ msgid "0-3设定后会将最近n次对话发给Ai有助于他更好的
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__set_chat_count #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__set_chat_count
msgid "0-5设定后会将最近n次对话发给Ai有助于他更好的回答但太大费用也高" msgid "0-5设定后会将最近n次对话发给Ai有助于他更好的回答但太大费用也高"
msgstr "" msgstr ""
@@ -203,17 +206,17 @@ msgid "00"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__top_p #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__top_p
msgid "0~1值越大越富有想像力越小则越保守" msgid "0~1值越大越富有想像力越小则越保守"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__temperature #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__temperature
msgid "0~2值越大越富有想像力越小则越保守" msgid "0~2值越大越富有想像力越小则越保守"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__chat_count #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__chat_count
msgid "0~3设定后会将最近n次对话发给Ai有助于他更好的回答" msgid "0~3设定后会将最近n次对话发给Ai有助于他更好的回答"
msgstr "" msgstr ""
@@ -355,7 +358,7 @@ msgid "1st place medal"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_chat_count__1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_chat_count__1
msgid "1标准" msgid "1标准"
msgstr "" msgstr ""
@@ -396,7 +399,7 @@ msgid "3.30"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_max_tokens__32000 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_max_tokens__32000
msgid "32K" msgid "32K"
msgstr "" msgstr ""
@@ -423,7 +426,7 @@ msgid "3rd place medal"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_chat_count__3 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_chat_count__3
msgid "3强关联" msgid "3强关联"
msgstr "" msgstr ""
@@ -484,7 +487,7 @@ msgid "5:30"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_chat_count__5 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_chat_count__5
msgid "5超强关联" msgid "5超强关联"
msgstr "" msgstr ""
@@ -574,17 +577,17 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#, python-format #, python-format
msgid "<div class=\"o_mail_notification\">joined the channel</div>" msgid "<div class=\"o_mail_notification\">joined the channel</div>"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_kanban #: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_kanban
msgid "<em>角色:</em>" msgid "<em>Role:</em>"
msgstr "" msgstr "<em>角色:</em>"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
@@ -623,16 +626,21 @@ msgstr ""
msgid "AI Completion Tokens" msgid "AI Completion Tokens"
msgstr "Ai回答Token" msgstr "Ai回答Token"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__ai_model
msgid "Ai Model"
msgstr "Ai模型"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__provider #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__provider
msgid "AI Provider" msgid "AI Provider"
msgstr "Ai服务商" msgstr "Ai服务商"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_res_config_settings__ai_chat_padding_time
msgid "Ai Padding Time"
msgstr "Ai对话间隔(秒)"
#. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_res_config_settings__ai_chat_padding_time
msgid "Amount of time (in seconds) between a conversation"
msgstr "每次与Ai对话的间隔时间以秒为单位。一般的Ai接口不允许适时间太多请求。"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
#: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0 #: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0
@@ -685,19 +693,66 @@ msgid "Africa"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_chat_count__none #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_chat_count__none
msgid "Ai Auto" msgid "Ai Auto"
msgstr "Ai自动判断" msgstr "Ai自动判断"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__description
msgid "Ai Character"
msgstr "AI角色设定"
#. module: app_chatgpt #. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form #: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form
msgid "Ai Character Set" msgid "Ai Character Set"
msgstr "Ai角色风格设定" msgstr "Ai角色风格设定"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form
msgid "Ai Config(Default value is prefer)"
msgstr "用户设定的角色相关,一般不要调整"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__is_ai_conversation
msgid "Ai Conversation"
msgstr "开启Ai二人转"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_kanban
msgid "Ai Conversation:"
msgstr "Ai二人转"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__ai_model
msgid "Ai Model"
msgstr "Ai模型"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form
msgid "Ai Parameter"
msgstr "Ai常规设定"
#. module: app_chatgpt #. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_robot_search_view #: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_robot_search_view
msgid "Ai Provider" msgid "Ai Provider"
msgstr "" msgstr "Ai服务商"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form
msgid "Ai Response Config"
msgstr "Ai智能优化设定具体参数"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_mail__ai2id
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_message__ai2id
msgid "Ai Response id"
msgstr "Ai响应id"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_mail__ai2model
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_message__ai2model
msgid "Ai Response model"
msgstr "Ai响应对象"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.actions.act_window,name:app_chatgpt.action_ai_robot #: model:ir.actions.act_window,name:app_chatgpt.action_ai_robot
@@ -706,6 +761,11 @@ msgstr ""
msgid "Ai Robot" msgid "Ai Robot"
msgstr "Ai机器人" msgstr "Ai机器人"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.app_chatgpt_res_users_form
msgid "Ai Robot Setting"
msgstr "Ai员工设定"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_res_partner_ai_use__ai_user_id #: model:ir.model.fields,field_description:app_chatgpt.field_res_partner_ai_use__ai_user_id
#: model_terms:ir.ui.view,arch_db:app_chatgpt.app_view_users_search #: model_terms:ir.ui.view,arch_db:app_chatgpt.app_view_users_search
@@ -713,14 +773,14 @@ msgid "Ai User"
msgstr "Ai用户" msgstr "Ai用户"
#. module: app_chatgpt #. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__description
msgid "Ai Parameter" msgid "Ai would help you act as the Character set."
msgstr "Ai常规设定" msgstr "Ai将按您设定的角色与场景进行思考并会话。"
#. module: app_chatgpt #. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form #: model:mail.channel,description:app_chatgpt.channel_ai_conversation
msgid "Ai Response Config" msgid "Ai互怼/辩论/二人转"
msgstr "Ai智能优化设定具体参数" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__res_users__gpt_policy__all #: model:ir.model.fields.selection,name:app_chatgpt.selection__res_users__gpt_policy__all
@@ -810,6 +870,11 @@ msgstr "头像"
msgid "Azure" msgid "Azure"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_robot_form_view
msgid "Azure AI Document"
msgstr "Azure Ai文档"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
#: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0 #: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0
@@ -924,15 +989,10 @@ msgstr ""
msgid "Channel Type" msgid "Channel Type"
msgstr "频道类型" msgstr "频道类型"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.app_chatgpt_res_users_form
msgid "ChatGPT"
msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ai.robot,name:app_chatgpt.chatgpt3_azure #: model:ai.robot,name:app_chatgpt.chatgpt3_azure
msgid "ChatGPT Azure" msgid "ChatGPT Azure"
msgstr "" msgstr "ChatGPT Azure云"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ai.robot,name:app_chatgpt.chatgpt_robot1 #: model:ai.robot,name:app_chatgpt.chatgpt_robot1
@@ -946,7 +1006,7 @@ msgstr "ChatGPT财务顾问"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#, python-format #, python-format
msgid "ChatGPT Robot【%s】have not set open api key." msgid "ChatGPT Robot【%s】have not set open api key."
msgstr "ChatGPT机器人【%s】没有设置 api key." msgstr "ChatGPT机器人【%s】没有设置 api key."
@@ -954,16 +1014,16 @@ msgstr "ChatGPT机器人【%s】没有设置 api key."
#. module: app_chatgpt #. module: app_chatgpt
#: model:ai.robot,name:app_chatgpt.chatgpt_robot #: model:ai.robot,name:app_chatgpt.chatgpt_robot
msgid "ChatGPT odoo" msgid "ChatGPT odoo"
msgstr "ChatGPT openAi" msgstr "ChatGPT Odoo"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ai.robot,name:app_chatgpt.chatgpt4_azure #: model:ai.robot,name:app_chatgpt.chatgpt4_azure
msgid "ChatGPT4 Azure" msgid "ChatGPT4 Azure"
msgstr "" msgstr "ChatGPT4 Azure云"
#. module: app_chatgpt #. module: app_chatgpt
#: model:discuss.channel,description:app_chatgpt.channel_chatgpt #: model:ai.robot,name:app_chatgpt.chatgpt4_32k_azure
msgid "ChatGPT话题" msgid "ChatGPT4-32k Azure"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
@@ -976,17 +1036,17 @@ msgstr "ChatGpt训练"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__code-davinci-002 #: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__code-davinci-002
msgid "Chatgpt 2 Code Optimized" msgid "Chatgpt 2 Code Optimized"
msgstr "" msgstr "Chatgpt2代码优化"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__text-davinci-002 #: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__text-davinci-002
msgid "Chatgpt 2 Davinci" msgid "Chatgpt 2 Davinci"
msgstr "" msgstr "Chatgpt2 达芬奇"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__text-davinci-003 #: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__text-davinci-003
msgid "Chatgpt 3 Davinci" msgid "Chatgpt 3 Davinci"
msgstr "" msgstr "Chatgpt3 达芬奇"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-3_5-turbo #: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-3_5-turbo
@@ -1009,7 +1069,7 @@ msgid "Chatgpt 4 32k"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__is_private #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__is_private
msgid "Check to set Private, Can only use by user, not Public" msgid "Check to set Private, Can only use by user, not Public"
msgstr "勾选后,即为私人频道,仅个人使用。" msgstr "勾选后,即为私人频道,仅个人使用。"
@@ -1118,7 +1178,7 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_res_users__gpt_demo_time #: model:ir.model.fields,field_description:app_chatgpt.field_res_users__gpt_demo_time
msgid "Default Demo Time" msgid "Default Demo Time"
msgstr "" msgstr "默认演示次数"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_ai_robot__sequence #: model:ir.model.fields,help:app_chatgpt.field_ai_robot__sequence
@@ -1131,7 +1191,7 @@ msgid "Disconnect"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model,name:app_chatgpt.model_mail_channel #: model:ir.model,name:app_chatgpt.model_discuss_channel
msgid "Discussion Channel" msgid "Discussion Channel"
msgstr "讨论频道" msgstr "讨论频道"
@@ -1166,7 +1226,7 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model,name:app_chatgpt.model_mail_thread #: model:ir.model,name:app_chatgpt.model_mail_thread
msgid "Email Thread" msgid "Email Thread"
msgstr "邮件会话" msgstr "EMail线程"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__endpoint #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__endpoint
@@ -1193,6 +1253,11 @@ msgstr ""
msgid "European" msgid "European"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__ext_ai_sys_content
msgid "Extend Robot Role"
msgstr "副Ai角色"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
#: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0 #: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0
@@ -1271,7 +1336,7 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__frequency_penalty #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__frequency_penalty
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__set_frequency_penalty #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__set_frequency_penalty
msgid "Frequency Penalty" msgid "Frequency Penalty"
msgstr "语言风格" msgstr "语言风格"
@@ -1289,6 +1354,16 @@ msgstr ""
msgid "Fuji" msgid "Fuji"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-4-turbo
msgid "GPT-4 Turbo"
msgstr ""
#. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-4o
msgid "GPT-4o"
msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
#: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0 #: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0
@@ -1330,7 +1405,7 @@ msgid "Hindu"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__set_chat_count #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__set_chat_count
msgid "History Count" msgid "History Count"
msgstr "上下文相关" msgstr "上下文相关"
@@ -1697,7 +1772,7 @@ msgid "Libra"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_max_tokens__2000 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_max_tokens__2000
msgid "Long" msgid "Long"
msgstr "长篇" msgstr "长篇"
@@ -1716,15 +1791,25 @@ msgid "Mahjong red dragon"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__ai_partner_id #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__ai_partner_id
msgid "Main Ai" msgid "Main Ai"
msgstr "专属主Ai" msgstr "专属主Ai"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__ai_partner_id #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__ai_partner_id
msgid "Main Ai is the robot help you default." msgid "Main Ai is the robot help you default."
msgstr "主Ai是主要对话对象当没有 @ 操作时由主Ai回答" msgstr "主Ai是主要对话对象当没有 @ 操作时由主Ai回答"
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_kanban
msgid "Main Ai:"
msgstr "专属主Ai:"
#. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__ai_sys_content
msgid "Main Robot Role"
msgstr "主Ai角色"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_res_partner_ai_use__max_number #: model:ir.model.fields,field_description:app_chatgpt.field_res_partner_ai_use__max_number
msgid "Max Number of Call" msgid "Max Number of Call"
@@ -1732,22 +1817,22 @@ msgstr "提问次数限制"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__max_tokens #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__max_tokens
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__set_max_tokens #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__set_max_tokens
msgid "Max Response" msgid "Max Response"
msgstr "响应长度限制" msgstr "响应长度限制"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__max_send_char #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__max_send_char
msgid "Max Send Char" msgid "Max Send Char"
msgstr "" msgstr "最大对话输入"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_ai_robot__max_send_char #: model:ir.model.fields,help:app_chatgpt.field_ai_robot__max_send_char
msgid "Max Send Prompt Length" msgid "Max Send Prompt Length"
msgstr "" msgstr "作为输入端可输入的最长Prompt以字符长度为基本单位"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_max_tokens__1000 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_max_tokens__1000
msgid "Medium" msgid "Medium"
msgstr "中等" msgstr "中等"
@@ -1973,7 +2058,7 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_robot_form_view #: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_robot_form_view
msgid "OpenAI Document" msgid "OpenAI Document"
msgstr "" msgstr "OpenAi文档"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
@@ -1992,7 +2077,7 @@ msgid "Orthodox cross"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_max_tokens__3000 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_max_tokens__3000
msgid "Overlength" msgid "Overlength"
msgstr "超长篇" msgstr "超长篇"
@@ -2046,37 +2131,37 @@ msgstr ""
#: code:addons/app_chatgpt/models/ai_robot.py:0 #: code:addons/app_chatgpt/models/ai_robot.py:0
#, python-format #, python-format
msgid "Please Set your AI robot's API Version first." msgid "Please Set your AI robot's API Version first."
msgstr "" msgstr "请先设置Ai机器人的Api版本。"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/ai_robot.py:0 #: code:addons/app_chatgpt/models/ai_robot.py:0
#, python-format #, python-format
msgid "Please Set your AI robot's endpoint first." msgid "Please Set your AI robot's endpoint first."
msgstr "" msgstr "请先设置Ai机器人的Api入口 Endpoint。"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#, python-format #, python-format
msgid "Please warmly welcome our new partner %s and send him the best wishes." msgid "Please warmly welcome our new partner %s and send him the best wishes."
msgstr "" msgstr "请热烈欢迎我们的新伙伴 %s 并给予一个大大的拥抱。"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__presence_penalty #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__presence_penalty
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__set_presence_penalty #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__set_presence_penalty
msgid "Presence penalty" msgid "Presence penalty"
msgstr "设置用词多样性" msgstr "设置用词多样性"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__is_private #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__is_private
msgid "Private" msgid "Private"
msgstr "私有频道" msgstr "私有频道"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_ai_robot__openapi_api_key #: model:ir.model.fields,help:app_chatgpt.field_ai_robot__openapi_api_key
msgid "Provide the API key here" msgid "Provide the API key here"
msgstr "" msgstr "在此填入Api Key"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
@@ -2095,8 +2180,8 @@ msgstr "模型快选"
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/ai_robot.py:0 #: code:addons/app_chatgpt/models/ai_robot.py:0
#: code:addons/app_chatgpt/models/ai_robot.py:0 #: code:addons/app_chatgpt/models/ai_robot.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#, python-format #, python-format
msgid "Response Timeout, please speak again." msgid "Response Timeout, please speak again."
msgstr "" msgstr ""
@@ -2117,7 +2202,7 @@ msgid ""
"Role-playing and scene setting.Give the model instructions about how it " "Role-playing and scene setting.Give the model instructions about how it "
"should behave and any context it should reference when generating a " "should behave and any context it should reference when generating a "
"response." "response."
msgstr "" msgstr "默认Ai的角色设定及场景设定。设定后如未在频道中设置额外角色则Ai将以此角色来进行对话。"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
@@ -2196,14 +2281,14 @@ msgid "Scorpius"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__ext_ai_partner_id #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__ext_ai_partner_id
msgid "Secondary Ai" msgid "Secondary Ai"
msgstr "辅助Ai" msgstr "辅助Ai"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__res_users__gpt_policy__limit #: model:ir.model.fields.selection,name:app_chatgpt.selection__res_users__gpt_policy__limit
msgid "Selected Users" msgid "Selected Users"
msgstr "" msgstr "指定的用户"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__sensitive_words #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__sensitive_words
@@ -2231,10 +2316,19 @@ msgid "Service Start Date"
msgstr "服务开始日期" msgstr "服务开始日期"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__set_temperature #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__set_temperature
msgid "Set Temperature" msgid "Set Temperature"
msgstr "设置创造性" msgstr "设置创造性"
#. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__is_ai_conversation
msgid ""
"Set active to make conversation between 2+ Ai Employee. You Just say first "
"word, then Ai robots Auto Chat."
msgstr ""
"激活后可让2个或2个以上的Ai进行对话。您可以以Ai身份或者第三人的身份说出论题然后两个Ai将按照您"
"定义的角色进行对话或辩论。"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
#: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0 #: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0
@@ -2258,7 +2352,7 @@ msgid "Shinto"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_max_tokens__300 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_max_tokens__300
msgid "Short" msgid "Short"
msgstr "简短" msgstr "简短"
@@ -2270,7 +2364,7 @@ msgid "Smileys & Emotion"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_max_tokens__600 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_max_tokens__600
msgid "Standard" msgid "Standard"
msgstr "标准" msgstr "标准"
@@ -2321,7 +2415,7 @@ msgstr "同步响应"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__sys_content #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__sys_content
msgid "System message" msgid "System message"
msgstr "" msgstr "默认角色提示词"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
@@ -2401,6 +2495,16 @@ msgstr ""
msgid "Temperature" msgid "Temperature"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__ai_sys_content
msgid "The Role the First Ai robot play for. This is for Ai Conversation."
msgstr "主Ai身份设定。主Ai将会按此进行角色扮演或设定场景。此设定用于多个Ai间对话或辩论。"
#. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__ext_ai_sys_content
msgid "The Role the Second Ai robot play for. This is for Ai Conversation."
msgstr "副Ai身份设定。副Ai将会按此进行角色扮演或设定场景。此设定用于多个Ai间对话或辩论。"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__ai_timeout #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__ai_timeout
msgid "Timeout(seconds)" msgid "Timeout(seconds)"
@@ -2440,7 +2544,7 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__top_p #: model:ir.model.fields,field_description:app_chatgpt.field_ai_robot__top_p
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__set_top_p #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__set_top_p
msgid "Top Probabilities" msgid "Top Probabilities"
msgstr "设置思维连贯性" msgstr "设置思维连贯性"
@@ -2577,6 +2681,11 @@ msgstr ""
msgid "Way" msgid "Way"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model:mail.channel,description:app_chatgpt.channel_chatgpt
msgid "You are a coding expert. Please help us to do odoo coding."
msgstr "您是一个编码专家是Odoo前端及后端开发高手现在您要对同伴进行技术支持。"
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-javascript #. odoo-javascript
#: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0 #: code:addons/app_chatgpt/static/src/models_data/emoji_data.js:0
@@ -11554,9 +11663,14 @@ msgstr ""
msgid "gorilla" msgid "gorilla"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-3_5-turbo-0125
msgid "gpt-3.5-turbo-0125"
msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-3_5-turbo-0613 #: model:ir.model.fields.selection,name:app_chatgpt.selection__ai_robot__set_ai_model__gpt-3_5-turbo-0613
msgid "gpt-3.5-turbo-0613(Default and Latest)" msgid "gpt-3.5-turbo-0613"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
@@ -27669,69 +27783,69 @@ msgid "ココ"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__chat_count #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__chat_count
msgid "上下文数量" msgid "上下文数量"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_top_p__0_9 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_top_p__0_9
msgid "严谨惯性思维" msgid "严谨惯性思维"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_temperature__0_1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_temperature__0_1
msgid "保守" msgid "保守"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_presence_penalty__0_1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_presence_penalty__0_1
msgid "允许常规重复" msgid "允许常规重复"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_presence_penalty__-1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_presence_penalty__-1
msgid "允许较多重复" msgid "允许较多重复"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_temperature__1_5 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_temperature__1_5
msgid "创造性" msgid "创造性"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__temperature #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__temperature
msgid "创造性值" msgid "创造性值"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_presence_penalty__2 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_presence_penalty__2
msgid "多样强迫症" msgid "多样强迫症"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_frequency_penalty__-2 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_frequency_penalty__-2
msgid "大白话" msgid "大白话"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_temperature__2 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_temperature__2
msgid "天马行空" msgid "天马行空"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_frequency_penalty__1_5 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_frequency_penalty__1_5
msgid "学院派-较多高级词" msgid "学院派-较多高级词"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_frequency_penalty__0_1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_frequency_penalty__0_1
msgid "少常用词" msgid "少常用词"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#, python-format #, python-format
msgid "您所发送的提示词已超长。" msgid "您所发送的提示词已超长。"
msgstr "" msgstr ""
@@ -27744,17 +27858,17 @@ msgid "提问/答复 消耗Token"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_presence_penalty__1_5 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_presence_penalty__1_5
msgid "新颖化" msgid "新颖化"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__is_current_channel #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__is_current_channel
msgid "是否当前用户默认微信对话频道" msgid "是否当前用户默认微信对话频道"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__is_current_channel #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__is_current_channel
msgid "是否当前用户默认频道" msgid "是否当前用户默认频道"
msgstr "" msgstr ""
@@ -27769,7 +27883,7 @@ msgid "暂时离开"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_presence_penalty__-2 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_presence_penalty__-2
msgid "更多强调重复" msgid "更多强调重复"
msgstr "" msgstr ""
@@ -27779,26 +27893,25 @@ msgid "最大响应Token,控制返回内容长度"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__max_tokens #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__max_tokens
msgid "最长响应Token" msgid "最长响应Token"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_frequency_penalty__1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_frequency_penalty__1
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_presence_penalty__1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_presence_penalty__1
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_temperature__1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_temperature__1
msgid "标准" msgid "标准"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_top_p__0_6 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_top_p__0_6
msgid "标准推理" msgid "标准推理"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/ai_robot.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0
#, python-format #, python-format
msgid "此Ai暂时未开放请联系管理员。" msgid "此Ai暂时未开放请联系管理员。"
msgstr "" msgstr ""
@@ -27810,41 +27923,35 @@ msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#. odoo-python #. odoo-python
#: code:addons/app_chatgpt/models/ai_robot.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0 #: code:addons/app_chatgpt/models/discuss_channel.py:0
#: code:addons/app_chatgpt/models/mail_channel.py:0
#, python-format #, python-format
msgid "温馨提示:您发送的内容含有敏感词,请修改内容后再向我发送。" msgid "温馨提示:您发送的内容含有敏感词,请修改内容后再向我发送。"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_temperature__0_6 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_temperature__0_6
msgid "理性" msgid "理性"
msgstr "" msgstr ""
#. module: app_chatgpt
#: model_terms:ir.ui.view,arch_db:app_chatgpt.ai_discuss_channel_view_form
msgid "Ai Config(Default value is prefer)"
msgstr "用户设定的角色相关,一般不要调整"
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_res_config_settings__openapi_context_timeout #: model:ir.model.fields,help:app_chatgpt.field_res_config_settings__openapi_context_timeout
msgid "群聊中多少分钟以内的聊天信息作为上下文继续" msgid "群聊中多少分钟以内的聊天信息作为上下文继续"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_frequency_penalty__2 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_frequency_penalty__2
msgid "老学究-晦涩难懂" msgid "老学究-晦涩难懂"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__max_tokens #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__max_tokens
#: model:ir.model.fields,help:app_chatgpt.field_mail_channel__set_max_tokens #: model:ir.model.fields,help:app_chatgpt.field_discuss_channel__set_max_tokens
msgid "越大返回内容越多,计费也越多" msgid "越大返回内容越多,计费也越多"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_top_p__0_4 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_top_p__0_4
msgid "跳跃性" msgid "跳跃性"
msgstr "" msgstr ""
@@ -27854,26 +27961,26 @@ msgid "进入频道"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__top_p #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__top_p
msgid "连贯性值" msgid "连贯性值"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_frequency_penalty__-1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_frequency_penalty__-1
msgid "通俗易懂" msgid "通俗易懂"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__frequency_penalty #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__frequency_penalty
msgid "避免常用词值" msgid "避免常用词值"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields,field_description:app_chatgpt.field_mail_channel__presence_penalty #: model:ir.model.fields,field_description:app_chatgpt.field_discuss_channel__presence_penalty
msgid "避免重复词值" msgid "避免重复词值"
msgstr "" msgstr ""
#. module: app_chatgpt #. module: app_chatgpt
#: model:ir.model.fields.selection,name:app_chatgpt.selection__mail_channel__set_top_p__0_1 #: model:ir.model.fields.selection,name:app_chatgpt.selection__discuss_channel__set_top_p__0_1
msgid "随便" msgid "随便"
msgstr "" msgstr ""

View File

@@ -39,8 +39,9 @@ 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-0125', ], default='gpt-4o',
help=""" help="""
GPT-4o: It is multimodal (accepting text or image inputs and outputting text), and it has the same high intelligence as GPT-4 Turbo but is much more efficient—it generates text 2x faster and is 50% cheaper.
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
DALL·E: A model that can generate and edit images given a natural language prompt DALL·E: A model that can generate and edit images given a natural language prompt
@@ -110,7 +111,7 @@ GPT-3 A set of models that can understand and generate natural language
# end gpt 参数 # end gpt 参数
endpoint = fields.Char('End Point', default='https://api.openai.com/v1/chat/completions') endpoint = fields.Char('End Point', default='https://api.openai.com/v1/chat/completions')
engine = fields.Char('Engine', help='If use Azure, Please input the Model deployment name.') engine = fields.Char('Engine', help='If use Azure, Please input the Model deployment name.')
api_version = fields.Char('API Version', default='2022-12-01') api_version = fields.Char('API Version', default='gpt-4o')
ai_timeout = fields.Integer('Timeout(seconds)', help="Connect timeout for Ai response", default=120) ai_timeout = fields.Integer('Timeout(seconds)', help="Connect timeout for Ai response", default=120)
sequence = fields.Integer('Sequence', help="Determine the display order", default=10) sequence = fields.Integer('Sequence', help="Determine the display order", default=10)
sensitive_words = fields.Text('Sensitive Words Plus', help='Sensitive word filtering. Separate keywords with a carriage return.') sensitive_words = fields.Text('Sensitive Words Plus', help='Sensitive word filtering. Separate keywords with a carriage return.')
@@ -156,7 +157,7 @@ GPT-3 A set of models that can understand and generate natural language
res = getattr(self, 'get_%s' % self.provider)(data, author_id, answer_id, param) res = getattr(self, 'get_%s' % self.provider)(data, author_id, answer_id, param)
# 后置勾子,返回处理后的内容 # 后置勾子,返回处理后的内容
res_post, usage, is_ai = self.get_ai_post(res, author_id, answer_id, param) res_post, usage, is_ai = self.get_ai_post(res, author_id, answer_id, param)
return res_post, usage, is_ai return res_post, usage, is_ai
def get_ai_origin(self, data, author_id=False, answer_id=False, param={}): def get_ai_origin(self, data, author_id=False, answer_id=False, param={}):
@@ -187,7 +188,6 @@ GPT-3 A set of models that can understand and generate natural language
param = {} param = {}
if not res or not author_id or (not isinstance(res, list) and not isinstance(res, dict)): if not res or not author_id or (not isinstance(res, list) and not isinstance(res, dict)):
return res, False, False return res, False, False
# 返回是个对象那么就是ai
usage = content = data = None usage = content = data = None
try: try:
if self.provider == 'openai': if self.provider == 'openai':
@@ -298,7 +298,7 @@ GPT-3 A set of models that can understand and generate natural language
client = OpenAI( client = OpenAI(
api_key=self.openapi_api_key, api_key=self.openapi_api_key,
timeout=R_TIMEOUT timeout=R_TIMEOUT
) )
response = client.chat.completions.create( response = client.chat.completions.create(
messages=data, messages=data,
model=self.ai_model, model=self.ai_model,
@@ -335,7 +335,7 @@ GPT-3 A set of models that can understand and generate natural language
top_p = param.get('top_p') if param.get('top_p') else self.top_p top_p = param.get('top_p') if param.get('top_p') else self.top_p
frequency_penalty = param.get('frequency_penalty') if param.get('frequency_penalty') else self.frequency_penalty frequency_penalty = param.get('frequency_penalty') if param.get('frequency_penalty') else self.frequency_penalty
presence_penalty = param.get('presence_penalty') if param.get('presence_penalty') else self.presence_penalty presence_penalty = param.get('presence_penalty') if param.get('presence_penalty') else self.presence_penalty
request_timeout= param.get('request_timeout') if param.get('request_timeout') else self.ai_timeout request_timeout = param.get('request_timeout') if param.get('request_timeout') else self.ai_timeout
# Ai角色设定如果没设定则再处理 # Ai角色设定如果没设定则再处理
if messages[0].get('role') != 'system': if messages[0].get('role') != 'system':

View File

@@ -34,7 +34,7 @@ class Channel(models.Model):
('2000', 'Long'), ('2000', 'Long'),
('3000', 'Overlength'), ('3000', 'Overlength'),
('32000', '32K'), ('32000', '32K'),
], string='Max Response', default='600', help="越大返回内容越多,计费也越多") ], string='Max Response', default='1000', help="越大返回内容越多,计费也越多")
set_chat_count = fields.Selection([ set_chat_count = fields.Selection([
('none', 'Ai Auto'), ('none', 'Ai Auto'),
('1', '1标准'), ('1', '1标准'),
@@ -82,11 +82,26 @@ class Channel(models.Model):
is_current_channel = fields.Boolean('是否当前用户默认频道', compute='_compute_is_current_channel', help='是否当前用户默认微信对话频道') is_current_channel = fields.Boolean('是否当前用户默认频道', compute='_compute_is_current_channel', help='是否当前用户默认微信对话频道')
# begin 处理Ai对话
is_ai_conversation = fields.Boolean('Ai Conversation', default=False,
help='Set active to make conversation between 2+ Ai Employee. You Just say first word, then Ai robots Auto Chat.')
# 主Ai角色设定
ai_sys_content = fields.Char('Main Robot Role', change_default=True,
help='The Role the First Ai robot play for. This is for Ai Conversation.')
# 辅助Ai角色设定
ext_ai_sys_content = fields.Char('Extend Robot Role', change_default=True,
help='The Role the Second Ai robot play for. This is for Ai Conversation.')
# end 处理Ai对话
def name_get(self): def name_get(self):
result = [] result = []
for c in self: for c in self:
pre = '[私]' if c.channel_type == 'channel' and c.is_private else '' if c.channel_type == 'channel' and c.is_private:
result.append((c.id, f"{pre}{c.name or ''}")) pre = '[私]'
else:
pre = ''
result.append((c.id, "%s%s" % (pre, c.name or '')))
return result return result
def get_openai_context(self, channel_id, author_id, answer_id, minutes=60, chat_count=0): def get_openai_context(self, channel_id, author_id, answer_id, minutes=60, chat_count=0):
@@ -174,6 +189,7 @@ class Channel(models.Model):
channel = self.env['discuss.channel'] channel = self.env['discuss.channel']
channel_type = self.channel_type channel_type = self.channel_type
messages = [] messages = []
add_sys_content = ''
# 不处理 一般notify但处理欢迎 # 不处理 一般notify但处理欢迎
if '<div class="o_mail_notification' in message.body and message.body != _('<div class="o_mail_notification">joined the channel</div>'): if '<div class="o_mail_notification' in message.body and message.body != _('<div class="o_mail_notification">joined the channel</div>'):
@@ -181,6 +197,7 @@ class Channel(models.Model):
if 'o_odoobot_command' in message.body: if 'o_odoobot_command' in message.body:
return rdata return rdata
# begin: 找ai增加 ai二人转功能。 chat类型不用管 使用其中一个ai登录即可。 author_id 是 res.partner 模型
if channel_type == 'chat': if channel_type == 'chat':
channel_partner_ids = self.channel_partner_ids channel_partner_ids = self.channel_partner_ids
answer_id = channel_partner_ids - message.author_id answer_id = channel_partner_ids - message.author_id
@@ -196,12 +213,20 @@ class Channel(models.Model):
# partner_ids = @ ids # partner_ids = @ ids
partner_ids = list(msg_vals.get('partner_ids')) partner_ids = list(msg_vals.get('partner_ids'))
if hasattr(self, 'ai_partner_id') and self.ai_partner_id: if hasattr(self, 'ai_partner_id') and self.ai_partner_id:
# 当有主id时使用主id if self.is_ai_conversation and self.ext_ai_partner_id:
if self.ai_partner_id.id in partner_ids: # 二人转模式时处理回答ai以及叠加角色的设定
if author_id == self.ai_partner_id.id:
partner_ids = [self.ext_ai_partner_id.id]
add_sys_content = self.ext_ai_sys_content
else:
partner_ids = [self.ai_partner_id.id]
add_sys_content = self.ai_sys_content
elif self.ai_partner_id.id in partner_ids:
# 其它普通Ai群。当有主id时使用主id
partner_ids = [self.ai_partner_id.id] partner_ids = [self.ai_partner_id.id]
if partner_ids: if partner_ids:
# 常规群聊 @ # 常规群聊 @
partners = self.env['res.partner'].search([('id', 'in', partner_ids)]) partners = self.env['res.partner'].search([('id', 'in', partner_ids)]) - message.author_id
# user_id = user, who has binded gpt robot # user_id = user, who has binded gpt robot
user_id = partners.mapped('user_ids').sudo().filtered(lambda r: r.gpt_id)[:1] user_id = partners.mapped('user_ids').sudo().filtered(lambda r: r.gpt_id)[:1]
elif message.body == _('<div class="o_mail_notification">joined the channel</div>'): elif message.body == _('<div class="o_mail_notification">joined the channel</div>'):
@@ -239,6 +264,8 @@ class Channel(models.Model):
# elif user_id.gpt_id and not is_allow: # elif user_id.gpt_id and not is_allow:
# # 暂时有限用户的Ai # # 暂时有限用户的Ai
# raise UserError(_('此Ai暂时未开放请联系管理员。')) # raise UserError(_('此Ai暂时未开放请联系管理员。'))
# end: 找ai增加 ai二人转功能
if hasattr(ai, 'is_translator') and ai.is_translator and ai.ai_model == 'translator': if hasattr(ai, 'is_translator') and ai.is_translator and ai.ai_model == 'translator':
return rdata return rdata
chatgpt_channel_id = self.env.ref('app_chatgpt.channel_chatgpt') chatgpt_channel_id = self.env.ref('app_chatgpt.channel_chatgpt')
@@ -247,7 +274,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.mail.html_to_inner_content(message.body) plaintext_ct = tools.html_to_inner_content(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:
@@ -257,12 +284,18 @@ class Channel(models.Model):
sync_config = self._context.get('app_ai_sync_config') sync_config = self._context.get('app_ai_sync_config')
else: else:
sync_config = self.env['ir.config_parameter'].sudo().get_param('app_chatgpt.openai_sync_config') sync_config = self.env['ir.config_parameter'].sudo().get_param('app_chatgpt.openai_sync_config')
if self._context.get('app_ai_chat_padding_time'):
padding_time = int(self._context.get('app_ai_chat_padding_time'))
else:
padding_time = int(self.env['ir.config_parameter'].sudo().get_param('app_chatgpt.ai_chat_padding_time'))
# api_key = self.env['ir.config_parameter'].sudo().get_param('app_chatgpt.openapi_api_key') # api_key = self.env['ir.config_parameter'].sudo().get_param('app_chatgpt.openapi_api_key')
# ai处理不要自问自答 # ai处理不要自问自答
if ai and answer_id != message.author_id: if ai and answer_id != message.author_id:
api_key = ai.openapi_api_key api_key = ai.openapi_api_key
if not api_key: if not api_key:
_logger.warning(_("ChatGPT Robot【%s】have not set open api key.")) _logger.warning(_("ChatGPT Robot【%s】have not set open api key.") % ai.name)
return rdata return rdata
try: try:
@@ -271,14 +304,10 @@ class Channel(models.Model):
openapi_context_timeout = 60 openapi_context_timeout = 60
openai.api_key = api_key openai.api_key = api_key
# 非4版本取0次。其它取3 次历史 # 非4版本取0次。其它取3 次历史
chat_count = 3
if '4' in ai.ai_model or '4' in ai.name: if '4' in ai.ai_model or '4' in ai.name:
chat_count = 1 chat_count = 1
if hasattr(self, 'chat_count'):
if self.chat_count > 0:
chat_count = 1
else: else:
chat_count = chat_count chat_count = self.chat_count or 3
if author_id != answer_id.id and self.channel_type == 'chat': if author_id != answer_id.id and self.channel_type == 'chat':
# 私聊 # 私聊
@@ -300,6 +329,9 @@ class Channel(models.Model):
messages.append({"role": "system", "content": file_content}) messages.append({"role": "system", "content": file_content})
try: try:
# 处理提示词
sys_content = channel.description + add_sys_content
messages.append({"role": "system", "content": sys_content})
c_history = self.get_openai_context(channel.id, author_id, answer_id, openapi_context_timeout, chat_count) c_history = self.get_openai_context(channel.id, author_id, answer_id, openapi_context_timeout, chat_count)
if c_history: if c_history:
messages += c_history messages += c_history
@@ -323,11 +355,11 @@ class Channel(models.Model):
self.get_ai_response(ai, messages, channel, user_id, message) self.get_ai_response(ai, messages, channel, user_id, message)
else: else:
if hasattr(self, 'with_delay'): if hasattr(self, 'with_delay'):
self.with_delay().get_ai_response(ai, messages, channel, user_id, message) self.with_delay(priority=30, eta=padding_time).get_ai_response(ai, messages, channel, user_id, message)
else: else:
self.get_ai_response(ai, messages, channel, user_id, message) self.get_ai_response(ai, messages, channel, user_id, message)
except Exception as e: except Exception as e:
raise UserError(e) raise UserError(_(e))
return rdata return rdata
@@ -365,3 +397,17 @@ class Channel(models.Model):
def _onchange_ai_partner_id(self): def _onchange_ai_partner_id(self):
if self.ai_partner_id and self.ai_partner_id.image_1920: if self.ai_partner_id and self.ai_partner_id.image_1920:
self.image_128 = self.ai_partner_id.avatar_128 self.image_128 = self.ai_partner_id.avatar_128
if self.ai_partner_id and not self.ai_sys_content:
if self.ai_partner_id.gpt_id:
self.ai_sys_content = self.ai_partner_id.gpt_id.sys_content
@api.onchange('ext_ai_partner_id')
def _onchange_ext_ai_partner_id(self):
if self.ext_ai_partner_id and not self.ext_ai_sys_content:
if self.ext_ai_partner_id.gpt_id:
self.ai_sys_content = self.ext_ai_partner_id.gpt_id.sys_content
@api.onchange('set_chat_count')
def _onchange_set_chat_count(self):
if self.set_chat_count:
self.chat_count = int(self.set_chat_count) if self.set_chat_count != 'none' else 0

View File

@@ -6,8 +6,13 @@ from odoo import fields, models
class ResConfigSettings(models.TransientModel): class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings" _inherit = "res.config.settings"
openapi_context_timeout = fields.Integer(string="Connect Timout", help="群聊中多少分钟以内的聊天信息作为上下文继续", config_parameter="app_chatgpt.openapi_context_timeout") openapi_context_timeout = fields.Integer(string="Connect Timout", help="群聊中多少分钟以内的聊天信息作为上下文继续",
config_parameter="app_chatgpt.openapi_context_timeout")
openai_sync_config = fields.Selection([ openai_sync_config = fields.Selection([
('sync', 'Synchronous'), ('sync', 'Synchronous'),
('async', 'Asynchronous') ('async', 'Asynchronous')
], string='Sync Config', default='sync', config_parameter="app_chatgpt.openai_sync_config") ], string='Sync Config', default='sync', config_parameter="app_chatgpt.openai_sync_config")
ai_chat_padding_time = fields.Integer(
string="Ai Padding Time", default=0.0, config_parameter="app_chatgpt.ai_chat_padding_time",
help="Amount of time (in seconds) between a conversation")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -2,9 +2,9 @@
<div class="oe_row oe_spaced" > <div class="oe_row oe_spaced" >
<div class="row"> <div class="row">
<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 GPT-4o, chatgpt 4 32k. 3.5 turbo, text-davinci, Integration All ChatGpt Api. </h3>
<div class="oe_row"> <div class="oe_row">
<h3>Latest update: v18.25.01.06</h3> <h3>Latest update: v18.25.02.10</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
@@ -110,7 +110,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>
@@ -125,7 +125,7 @@
<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>
<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="demo3.jpg"/> <img src="demo3.jpg"/>
</div> </div>
@@ -225,6 +225,18 @@
<h2 class="text-center bg-info text-white pt16 pb16">- How to setup and use -</h2> <h2 class="text-center bg-info text-white pt16 pb16">- How to setup and use -</h2>
</section> </section>
<section class="oe_container container"> <section class="oe_container container">
<div class="oe_row oe_spaced">
<h4 class="pt16">
To install this addon, you need to install official OpenAI Python dependencies.
</h4>
<code>
pip install openai
</code>
or
<code>
pip install openai --upgrade
</code>
</div>
<div class="oe_row oe_spaced"> <div class="oe_row oe_spaced">
<h4 class="pt16"> <h4 class="pt16">
1. Get ChatGPT Api key from openai or azure. 1. Get ChatGPT Api key from openai or azure.
@@ -260,13 +272,13 @@
<img src="setup5.jpg"> <img src="setup5.jpg">
</div> </div>
</div> </div>
<h5 class="pt16">6. You can setup the Ai system context and Character.</h5> <h4 class="pt16">6. You can setup the Ai system context and Character.</h4>
<div class="row"> <div class="row">
<div class="oe_demo oe_screenshot img img-fluid"> <div class="oe_demo oe_screenshot img img-fluid">
<img src="setup6.jpg"> <img src="setup6.jpg">
</div> </div>
</div> </div>
<h5 class="pt16">7. You can setup Lots of channel for subjects and projects..</h5> <h4 class="pt16">7. You can setup Lots of channel for subjects and projects..</h4>
<div class="row"> <div class="row">
<div class="oe_demo oe_screenshot img img-fluid"> <div class="oe_demo oe_screenshot img img-fluid">
<img src="setup7.jpg"> <img src="setup7.jpg">

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -1,39 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve"> <templates xml:space="preserve">
<t t-name="app_chatgpt.Message" t-inherit="mail.Message" t-inherit-mode="extension"> <t t-name="app_chatgpt.Message" t-inherit="mail.Message" t-inherit-mode="extension">
<xpath expr="//t[@t-if='showSubtypeDescription']" position="after"> <xpath expr="//div[hasclass('o_Message_prettyBody')]//.." position="replace">
<!-- <p>gpt xml测试<t t-esc="message.ai_completion_tokens"/></p>--> <t t-if="!messageView.composerViewInEditing">
<div t-if="!state.isEditing" name="bottom_operation" class="position-relative mt-8"> <div class="o_Message_prettyBody" t-ref="prettyBody"/><!-- messageView.message.prettyBody is inserted here from _update() -->
<div t-if="message.human_prompt_tokens &gt; 0 or message.ai_completion_tokens &gt;0" <div name="bottom_operation" class="position-relative mt-8">
class="o_Message_token text-muted" style="float:left;display:inline;font-size: 13px;"> <div t-if="messageView.message.human_prompt_tokens &gt; 0 or messageView.message.ai_completion_tokens &gt;0"
<br/> class="o_Message_token text-muted" style="float:left;display:inline;font-size: 13px;">
------------------ <br/>
<br/> ------------------
<span title="提问/答复 消耗Token"> <br/>
<t t-esc="message.human_prompt_tokens"/> <span title="提问/答复 消耗Token">
/ <t t-esc="messageView.message.human_prompt_tokens"/> / <t t-esc="messageView.message.ai_completion_tokens"/>
<t t-esc="message.ai_completion_tokens"/> </span>
</span>
</div>
<!-- 直接将btn处理方法置于此-->
<div name="action_btn" style="padding:40px 5px 0px 5px;float:right;">
<div class="position-relative" style="padding:0px 5px;height:20px;display:inline-block;">
<button t-on-click="copy" class="btn d-flex p-0 rounded-1">
<i class="o_MessageView_btn fa fa-copy o_MessageActionView_actionCopy"/>
</button>
</div>
<div class="position-relative" style="padding:0px 5px;height:20px;display:inline-block;">
<button t-on-click="onClickMarkAsGood" class="btn d-flex p-0 rounded-1">
<i class="o_MessageView_btn fa fa-thumbs-up"/>
</button>
</div>
<div class="position-relative" style="padding:0px 0px 0px 5px;height:20px;display:inline-block;">
<button t-on-click="onClickMarkAsBad" class="btn d-flex p-0 rounded-1">
<i class="o_MessageView_btn fa fa-thumbs-down"/>
</button>
</div> </div>
</div> </div>
</div>
</t>
</xpath> </xpath>
</t> </t>
</templates> </templates>

View File

@@ -9,6 +9,7 @@
<field name="name"/> <field name="name"/>
<field name="provider" optional="hide"/> <field name="provider" optional="hide"/>
<field name="ai_model" optional="show"/> <field name="ai_model" optional="show"/>
<field name="api_version" optional="hide"/>
<field name="openapi_api_key" password="True"/> <field name="openapi_api_key" password="True"/>
<field name="max_tokens" optional="show"/> <field name="max_tokens" optional="show"/>
<field name="temperature"/> <field name="temperature"/>
@@ -62,7 +63,7 @@
<form> <form>
<header> <header>
<button string="Get List Model" type="object" name="get_ai_list_model"/> <button string="Get List Model" type="object" name="get_ai_list_model"/>
<button string="Get Model Info" type="object" name="get_ai_model_info" invisible="provider != 'openai'"/> <button string="Get Model Info" type="object" name="get_ai_model_info"/>
</header> </header>
<sheet> <sheet>
<div class="oe_button_box" name="button_box"> <div class="oe_button_box" name="button_box">
@@ -161,4 +162,4 @@
action="action_ai_robot" action="action_ai_robot"
groups="base.group_system"/> groups="base.group_system"/>
</odoo> </odoo>

View File

@@ -10,6 +10,7 @@
<xpath expr="//field[@name='name']" position="after"> <xpath expr="//field[@name='name']" position="after">
<field name="ai_partner_id" optional="show"/> <field name="ai_partner_id" optional="show"/>
<field name="description" optional="show"/> <field name="description" optional="show"/>
<field name="is_private" optional="show"/>
<field name="set_max_tokens" optional="hide"/> <field name="set_max_tokens" optional="hide"/>
</xpath> </xpath>
</field> </field>
@@ -24,12 +25,17 @@
<xpath expr="//page[@name='privacy']" position="before"> <xpath expr="//page[@name='privacy']" position="before">
<page name="page_user" string="Ai Config(Default value is prefer)"> <page name="page_user" string="Ai Config(Default value is prefer)">
<group> <group>
<group name="role_set" string="Ai常规设定"> <group name="role_set" string="Ai Parameter">
<field name="channel_type" readonly="1"/> <field name="channel_type" readonly="1"/>
<field name="ai_partner_id" <field name="ai_partner_id" widget="many2one_avatar"
options="{'no_open': True, 'no_create': True}"/> options="{'no_open': True, 'no_create': True}"/>
<field name="ext_ai_partner_id" <field name="ext_ai_partner_id" widget="many2one_avatar"
options="{'no_open': True, 'no_create': True}"/> options="{'no_open': True, 'no_create': True}"/>
<field name="is_ai_conversation" widget="boolean_toggle"/>
<field name="ai_sys_content" attrs="{'invisible':[('is_ai_conversation','!=',True)]}"
widget="text" rowCount="4" colspan="2"/>
<field name="ext_ai_sys_content" attrs="{'invisible':[('is_ai_conversation','!=',True)]}"
widget="text" rowCount="4" colspan="2"/>
</group> </group>
<group name="param_set" string="Ai Character Set"> <group name="param_set" string="Ai Character Set">
<div class="o_td_label"> <div class="o_td_label">
@@ -87,16 +93,31 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//kanban//field[1]" position="before"> <xpath expr="//kanban//field[1]" position="before">
<field name="is_private"/> <field name="is_private"/>
<field name="ai_partner_id"/>
<field name="ext_ai_partner_id"/>
<field name="is_ai_conversation"/>
</xpath> </xpath>
<xpath expr="//field[@name='description']" position="before"> <xpath expr="//field[@name='description']" position="before">
<em>角色:</em> <em>Role:</em>
</xpath> </xpath>
<xpath expr="//button[@name='channel_join']" position="replace"> <xpath expr="//button[@name='channel_join']" position="replace">
<button invisible="is_private and group_ids" <div class="row mt4 mb4">
<span class="mr4">
Main Ai:<field name="ai_partner_id" widget="many2one_avatar" class="ml4 mr8"
options="{'no_open': True, 'no_create': True}"/>
</span>
<span>
Ai Conversation:<field name="is_ai_conversation" widget="boolean_toggle"/>
</span>
</div>
<button invisible="is_member or group_ids"
class="btn btn-warning float-end" type="edit"> class="btn btn-warning float-end" type="edit">
智能设定 智能设定
</button> </button>
<button type="object" invisible="is_member or group_ids" class="btn btn-primary float-end" name="channel_join">进入频道</button> <button type="object" invisible="is_member or group_ids"
class="btn btn-primary float-end" name="channel_join">
进入频道
</button>
</xpath> </xpath>
<xpath expr="//button[@name='action_unfollow']" position="replace"> <xpath expr="//button[@name='action_unfollow']" position="replace">
<button type="object" invisible="is_member or group_ids" <button type="object" invisible="is_member or group_ids"

View File

@@ -20,14 +20,14 @@
</button> </button>
</xpath> </xpath>
<xpath expr="//page[@name='preferences']" position="after"> <xpath expr="//page[@name='preferences']" position="after">
<page name="page_chatgpt" string="ChatGPT"> <page name="page_chatgpt" string="Ai Robot Setting">
<group> <group>
<group> <group>
<field name="gpt_id"/> <field name="gpt_id"/>
<field name="gpt_policy"/> <field name="gpt_policy"/>
<field name="gpt_wl_partners" widget="many2many_tags" invisible="gpt_policy == 'all'"/> <field name="gpt_wl_partners" widget="many2many_tags" invisible="gpt_policy == 'all'"/>
<field name="gpt_demo_time"/> <field name="gpt_demo_time"/>
<field name="is_chat_private"/> <field name="is_chat_private" widget="boolean_toggle"/>
</group> </group>
</group> </group>
</page> </page>

View File

@@ -10,4 +10,5 @@
<field name="sequence">11</field> <field name="sequence">11</field>
<field name="image_avatar" type="base64" file="app_deepseek/static/src/img/deepseek.png"/> <field name="image_avatar" type="base64" file="app_deepseek/static/src/img/deepseek.png"/>
</record> </record>
</odoo> </odoo>

View File

@@ -2,7 +2,7 @@
<odoo> <odoo>
<data noupdate="1"> <data noupdate="1">
<record id="partner_deepseek_chat" model="res.partner"> <record id="partner_deepseek_chat" model="res.partner">
<field name="name">Deepseek聊天</field> <field name="name">Deepseek聊天Ai</field>
<field name="image_1920" type="base64" file="app_deepseek/static/src/img/deepseek.png"/> <field name="image_1920" type="base64" file="app_deepseek/static/src/img/deepseek.png"/>
</record> </record>

View File

@@ -56,7 +56,7 @@ msgid "BLOOMZ-7B"
msgstr "" msgstr ""
#. module: app_ai_baidu #. module: app_ai_baidu
#: model:ir.model,name:app_ai_baidu.model_mail_channel #: model:ir.model,name:app_ai_baidu.model_discuss_channel
msgid "Discussion Channel" msgid "Discussion Channel"
msgstr "" msgstr ""
@@ -90,7 +90,7 @@ msgstr "模型快选"
#. module: app_ai_baidu #. module: app_ai_baidu
#. odoo-python #. odoo-python
#: code:addons/app_ai_baidu/models/mail_channel.py:0 #: code:addons/app_ai_baidu/models/discuss_channel.py:0
#, python-format #, python-format
msgid "Response Timeout, please speak again." msgid "Response Timeout, please speak again."
msgstr "" msgstr ""
@@ -102,7 +102,7 @@ msgstr ""
#. module: app_ai_baidu #. module: app_ai_baidu
#. odoo-python #. odoo-python
#: code:addons/app_ai_baidu/models/mail_channel.py:0 #: code:addons/app_ai_baidu/models/discuss_channel.py:0
#, python-format #, python-format
msgid "温馨提示:您发送的内容含有敏感词,请修改内容后再向我发送。" msgid "温馨提示:您发送的内容含有敏感词,请修改内容后再向我发送。"
msgstr "" msgstr ""

View File

@@ -26,7 +26,8 @@ class AiRobot(models.Model):
@api.onchange('provider') @api.onchange('provider')
def _onchange_provider(self): def _onchange_provider(self):
if self.provider == 'deepseek': if self.provider == 'deepseek':
self.endpoint = 'https://api.deepseek.com' if self.ai_model == 'deepseek-chat':
self.endpoint = 'https://api.deepseek.com'
# 取头像 # 取头像
module_path = modules.get_module_path('app_ai', display_warning=False) module_path = modules.get_module_path('app_ai', display_warning=False)
if module_path: if module_path:

View File

@@ -6,7 +6,7 @@
<field name="inherit_id" ref="app_chatgpt.ai_robot_form_view"/> <field name="inherit_id" ref="app_chatgpt.ai_robot_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//button[@name='get_ai_list_model']" position="attributes"> <xpath expr="//button[@name='get_ai_list_model']" position="attributes">
<attribute name="invisible">False</attribute> <attribute name="attrs">{'invisible': 0}</attribute>
</xpath> </xpath>
</field> </field>
</record> --> </record> -->