mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
Merge branch '16.0' of https://github.com/guohuadeng/app-odoo into 16.0
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
{
|
||||
'name': 'ChatGPT4, China Ali,AiGC Center.Ai服务中心,聚合全网Ai',
|
||||
'version': '16.23.09.24',
|
||||
'version': '16.23.09.27',
|
||||
'author': 'odooai.cn',
|
||||
'company': 'odooai.cn',
|
||||
'maintainer': 'odooai.cn',
|
||||
|
||||
@@ -387,11 +387,15 @@ GPT-3 A set of models that can understand and generate natural language
|
||||
"presence_penalty": 0.1,
|
||||
"stop": stop
|
||||
}
|
||||
response = requests.post(o_url, data=json.dumps(pdata), headers=headers, timeout=R_TIMEOUT)
|
||||
res = response.json()
|
||||
if 'choices' in res:
|
||||
res = '\n'.join([x['text'] for x in res['choices']])
|
||||
return res
|
||||
response = openai.ChatCompletion.create(
|
||||
model=self.ai_model,
|
||||
messages=data
|
||||
)
|
||||
# response = requests.post(o_url, data=json.dumps(pdata), headers=headers, timeout=R_TIMEOUT)
|
||||
if 'choices' in response:
|
||||
return response
|
||||
else:
|
||||
_logger.warning('=====================openai output data: %s' % response.json())
|
||||
|
||||
return _("Response Timeout, please speak again.")
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ class Channel(models.Model):
|
||||
# elif user_id.gpt_id and not is_allow:
|
||||
# # 暂时有限用户的Ai
|
||||
# raise UserError(_('此Ai暂时未开放,请联系管理员。'))
|
||||
if hasattr(ai, 'is_translator') and ai.is_translator:
|
||||
if hasattr(ai, 'is_translator') and ai.is_translator and ai.ai_model == 'translator':
|
||||
return rdata
|
||||
chatgpt_channel_id = self.env.ref('app_chatgpt.channel_chatgpt')
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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>
|
||||
<div class="oe_row">
|
||||
<h3>Lastest update: v16.23.09.22</h3>
|
||||
<h3>Lastest update: v16.23.09.27</h3>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
Add Alibaba Qwen support(search 'app_ai_ali'), update chatgpt api
|
||||
|
||||
@@ -61,9 +61,6 @@
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="ai_user_id"/>
|
||||
<searchpanel>
|
||||
<field name="ai_user_id"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<field name="gpt_policy"/>
|
||||
<field name="gpt_wl_partners" widget="many2many_tags" attrs="{'invisible': [('gpt_policy', '=', 'all')]}"/>
|
||||
<field name="gpt_demo_time"/>
|
||||
<field name="is_chat_private"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user