jeawin-astro 3.0.95 → 3.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import {render_value, render_lang} from "../scripts/util.js";
|
|
3
|
-
const {jeawin_form_api_domain, jeawinapi, all_langs} = Astro.locals;
|
|
3
|
+
const {jeawin_form_api_domain, jeawinapi, all_langs, siteinfo} = Astro.locals;
|
|
4
4
|
let chatbot_status = false;
|
|
5
5
|
let prompts = [];
|
|
6
6
|
let assistant_name = '';
|
|
@@ -31,6 +31,7 @@ try{
|
|
|
31
31
|
<link rel="stylesheet" crossorigin href="https://img.jeawincdn.com/resource/web-chatbot-ui/dist/index.css" />
|
|
32
32
|
<script is:inline type="module" crossorigin="true" src="https://img.jeawincdn.com/resource/web-chatbot-ui/dist/index.js"></script>
|
|
33
33
|
<script define:vars={{
|
|
34
|
+
siteinfo: siteinfo,
|
|
34
35
|
jeawin_form_api_domain:jeawin_form_api_domain,
|
|
35
36
|
assistant_name: assistant_name,
|
|
36
37
|
assistant_avatar: assistant_avatar,
|
|
@@ -47,7 +48,7 @@ try{
|
|
|
47
48
|
// @ts-ignore
|
|
48
49
|
window.CHATBOT_CONFIG = {
|
|
49
50
|
title: title,
|
|
50
|
-
endpoint: `${jeawin_form_api_domain}/api.php?c=chatbot&m=chat`, // 可以替换为 https://{your-fc-http-trigger-domain}/chat
|
|
51
|
+
endpoint: `${jeawin_form_api_domain}/api.php?c=chatbot&m=chat&site_id=${siteinfo.id}`, // 可以替换为 https://{your-fc-http-trigger-domain}/chat
|
|
51
52
|
displayByDefault: false, // 默认不展示 AI 助手聊天框
|
|
52
53
|
aiChatOptions: { // aiChatOptions 中 options 会传递 aiChat 组件,自定义取值参考:https://docs.nlkit.com/nlux/reference/ui/ai-chat
|
|
53
54
|
conversationOptions: { // 自定义取值参考:https://docs.nlkit.com/nlux/reference/ui/ai-chat#conversation-options
|