update ai seo

This commit is contained in:
Ivan Office
2023-09-24 02:05:16 +08:00
parent 14109aef66
commit e51f61183f
67 changed files with 20593 additions and 4425 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="app_chatgpt.Message" t-inherit="mail.Message" t-inherit-mode="extension">
<xpath expr="//div[hasclass('o_Message_prettyBody')]//.." position="replace">
<t t-if="!messageView.composerViewInEditing">
<div class="o_Message_prettyBody" t-ref="prettyBody"/><!-- messageView.message.prettyBody is inserted here from _update() -->
<div name="bottom_operation" class="position-relative mt-8">
<div t-if="messageView.message.human_prompt_tokens &gt; 0 or messageView.message.ai_completion_tokens &gt;0"
class="o_Message_token text-muted" style="float:left;display:inline;font-size: 13px;">
<br/>
------------------
<br/>
<span title="提问/答复 消耗Token">
<t t-esc="messageView.message.human_prompt_tokens"/> / <t t-esc="messageView.message.ai_completion_tokens"/>
</span>
</div>
</div>
</t>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,30 @@
/** @odoo-module **/
import { insert } from '@mail/model/model_field_command';
import { attr, many, one } from '@mail/model/model_field';
import { registerPatch } from '@mail/model/model_core';
registerPatch({
name: 'Message',
modelMethods: {
convertData(data) {
const data2 = this._super(data);
if ('human_prompt_tokens' in data) {
data2.human_prompt_tokens = data.human_prompt_tokens;
}
if ('ai_completion_tokens' in data) {
data2.ai_completion_tokens = data.ai_completion_tokens;
}
if ('is_ai' in data) {
data2.is_ai = data.is_ai;
}
return data2;
},
},
fields: {
human_prompt_tokens: attr(),
ai_completion_tokens: attr(),
is_ai: attr(),
}
})

View File

@@ -21857,55 +21857,6 @@ const emojisData0 = `{
"shortcodes": [
":thumbs_down:"
]
},
{
"category": "ChatGpt Training",
"codepoints": "👐",
"emoticons": [],
"keywords": [
"` + _lt("mark") + `",
"` + _lt("neutral") + `",
"` + _lt("hand") + `",
"` + _lt("open") + `",
"` + _lt("open hands") + `"
],
"name": "` + _lt("mark_as_neutral. open hands") + `",
"shortcodes": [
":open_hands:"
]
},
{
"category": "ChatGpt Training",
"codepoints": "👋",
"emoticons": [],
"keywords": [
"` + _lt("mark") + `",
"` + _lt("redundant") + `",
"` + _lt("hand") + `",
"` + _lt("wave") + `",
"` + _lt("waving") + `"
],
"name": "` + _lt("mark_as_redundant. waving hand") + `",
"shortcodes": [
":waving_hand:"
]
},
{
"category": "ChatGpt Training",
"codepoints": "🈵",
"emoticons": [],
"keywords": [
"` + _lt("mark") + `",
"` + _lt("unhelpful") + `",
"` + _lt("“no vacancy”") + `",
"` + _lt("ideograph") + `",
"` + _lt("Japanese") + `",
"` + _lt("満") + `"
],
"name": "` + _lt("mark_as_unhelpful. Need more answer") + `",
"shortcodes": [
":Japanese_“no_vacancy”_button:"
]
},`;
export const emojisData = JSON.parse(`[