diff --git a/packages/global/support/wallet/bill/type.d.ts b/packages/global/support/wallet/bill/type.d.ts index 0b667d3ba..e44502160 100644 --- a/packages/global/support/wallet/bill/type.d.ts +++ b/packages/global/support/wallet/bill/type.d.ts @@ -21,6 +21,11 @@ export type BillSchemaType = { datasetSize?: number; extraPoints?: number; }; + refundData?: { + amount: number; + refundId: string; + refundTime: Date; + }; }; export type ChatNodeUsageType = { diff --git a/packages/service/core/chat/chatItemSchema.ts b/packages/service/core/chat/chatItemSchema.ts index a69211eb1..69280dc33 100644 --- a/packages/service/core/chat/chatItemSchema.ts +++ b/packages/service/core/chat/chatItemSchema.ts @@ -95,8 +95,6 @@ try { close custom feedback; */ ChatItemSchema.index({ appId: 1, chatId: 1, dataId: 1 }); - // admin charts - ChatItemSchema.index({ time: -1, obj: 1 }); // timer, clear history ChatItemSchema.index({ teamId: 1, time: -1 }); diff --git a/packages/web/components/common/Textarea/JsonEditor/index.tsx b/packages/web/components/common/Textarea/JsonEditor/index.tsx index bb3e9fe9f..cc0489fe6 100644 --- a/packages/web/components/common/Textarea/JsonEditor/index.tsx +++ b/packages/web/components/common/Textarea/JsonEditor/index.tsx @@ -178,7 +178,7 @@ const JSONEditor = ({ } catch (error) { toast({ status: 'warning', - title: t('common:jsonEditor.Parse error') + title: t('common:json_parse_error') }); } }, [value]); diff --git a/packages/web/hooks/useCopyData.tsx b/packages/web/hooks/useCopyData.tsx index d703d4e68..801c9ae4c 100644 --- a/packages/web/hooks/useCopyData.tsx +++ b/packages/web/hooks/useCopyData.tsx @@ -20,7 +20,7 @@ export const useCopyData = () => { const copyData = useCallback( async ( data: string, - title: string | null | undefined = t('common:Copy Successful'), + title: string | null | undefined = t('common:copy_successful'), duration = 1000 ) => { data = data.trim(); diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 99ae08a0a..7a23b2136 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -135,7 +135,7 @@ "comfirm_leave_page": "Confirm to Leave This Page?", "Continue_Adding": "Continue adding", "Copy": "Copy", - "Copy Successful": "Copied Successfully", + "copy_successful": "Copied Successfully", "create_failed": "Creation Failed", "create_success": "Created Successfully", "create_time": "Creation Time", @@ -239,7 +239,7 @@ "have_done": "Completed", "input.Repeat Value": "Duplicate Value", "is_requesting": "Requesting...", - "jsonEditor.Parse error": "Possible JSON Error, Please Check Carefully", + "json_parse_error": "Possible JSON Error, Please Check Carefully", "json_config": "JSON Configuration", "link.UnValid": "Invalid Link", "month": "Month", @@ -251,13 +251,13 @@ "redo_tip_mac": "Redo ⌘ shift z", "request_end": "All Loaded", "request_more": "Click to Load More", - "speech.error tip": "Speech to Text Failed", - "speech.not support": "Your Browser Does Not Support Speech Input", + "speech_error_tip": "Speech to Text Failed", + "speech_not_support": "Your Browser Does Not Support Speech Input", "submit_success": "Submitted Successfully", "submitted": "Submitted", "support": "Support", - "system.Help Chatbot": "Help Chatbot", - "system.Use Helper": "Use Helper", + "system_help_chatbot": "Help Chatbot", + "use_helper": "Use Helper", "ui.textarea.Magnifying": "Magnifying", "undo_tip": "Undo ctrl z", "undo_tip_mac": "Undo ⌘ z ", @@ -274,7 +274,6 @@ "contact_way": "Notification Received", "contribute_app_template": "Contribute Template", "core.Chat": "Chat", - "core.Max Token": "Max Token", "core.ai.Max context": "Max Context", "core.ai.Model": "Model", "core.ai.Not deploy rerank model": "Re-rank Model Not Deployed", diff --git a/packages/web/i18n/zh-CN/common.json b/packages/web/i18n/zh-CN/common.json index 73da5ebaa..c72a78409 100644 --- a/packages/web/i18n/zh-CN/common.json +++ b/packages/web/i18n/zh-CN/common.json @@ -133,7 +133,7 @@ "comfirm_leave_page": "确认离开该页面?", "Continue_Adding": "继续添加", "Copy": "复制", - "Copy Successful": "复制成功", + "copy_successful": "复制成功", "create_failed": "创建异常", "create_success": "创建成功", "create_time": "创建时间", @@ -239,7 +239,7 @@ "have_done": "已完成", "input.Repeat Value": "有重复的值", "is_requesting": "请求中……", - "jsonEditor.Parse error": "JSON 可能有误,请仔细检查", + "json_parse_error": "JSON 可能有误,请仔细检查", "json_config": "JSON 配置", "link.UnValid": "无效的链接", "month": "月", @@ -251,13 +251,13 @@ "redo_tip_mac": "恢复 ⌘ shift z", "request_end": "已加载全部", "request_more": "点击加载更多", - "speech.error tip": "语音转文字失败", - "speech.not support": "您的浏览器不支持语音输入", + "speech_error_tip": "语音转文字失败", + "speech_not_support": "您的浏览器不支持语音输入", "submit_success": "提交成功", "submitted": "已提交", "support": "支持", - "system.Help Chatbot": "机器人助手", - "system.Use Helper": "使用帮助", + "system_help_chatbot": "机器人助手", + "use_helper": "使用帮助", "ui.textarea.Magnifying": "放大", "undo_tip": "撤销 ctrl z", "undo_tip_mac": "撤销 ⌘ z ", @@ -273,7 +273,6 @@ "contact_way": "通知接收", "contribute_app_template": "贡献模板", "core.Chat": "对话", - "core.Max Token": "单条数据上限", "core.ai.Max context": "最大上下文", "core.ai.Model": "AI 模型", "core.ai.Not deploy rerank model": "未部署重排模型", diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json index 6611468fe..b190f15f1 100644 --- a/packages/web/i18n/zh-Hant/common.json +++ b/packages/web/i18n/zh-Hant/common.json @@ -132,7 +132,7 @@ "comfirm_leave_page": "確認離開此頁面?", "Continue_Adding": "繼續新增", "Copy": "複製", - "Copy Successful": "複製成功", + "copy_successful": "複製成功", "create_failed": "建立失敗", "create_success": "建立成功", "create_time": "建立時間", @@ -238,7 +238,7 @@ "have_done": "已完成", "input.Repeat Value": "重複的值", "is_requesting": "請求中...", - "jsonEditor.Parse error": "可能有 JSON 錯誤,請仔細檢查", + "json_parse_error": "可能有 JSON 錯誤,請仔細檢查", "json_config": "JSON 設定", "link.UnValid": "無效的連結", "month": "月", @@ -250,13 +250,13 @@ "redo_tip_mac": "重做 ⌘ shift z", "request_end": "已載入全部", "request_more": "點選載入更多", - "speech.error tip": "語音轉文字失敗", - "speech.not support": "您的瀏覽器不支援語音輸入", + "speech_error_tip": "語音轉文字失敗", + "speech_not_support": "您的瀏覽器不支援語音輸入", "submit_success": "送出成功", "submitted": "已送出", "support": "支援", - "system.Help Chatbot": "機器人助手", - "system.Use Helper": "使用說明", + "system_help_chatbot": "機器人助手", + "use_helper": "使用說明", "ui.textarea.Magnifying": "放大", "undo_tip": "復原 ctrl z", "undo_tip_mac": "復原 ⌘ z ", @@ -273,7 +273,6 @@ "contact_way": "通知接收", "contribute_app_template": "貢獻範本", "core.Chat": "對話", - "core.Max Token": "單筆資料上限", "core.ai.Max context": "最大上下文", "core.ai.Model": "AI 模型", "core.ai.Not deploy rerank model": "未部署重新排名模型", diff --git a/projects/app/src/pages/api/core/dataset/searchTest.ts b/projects/app/src/pages/api/core/dataset/searchTest.ts index 316a67b49..e990cd430 100644 --- a/projects/app/src/pages/api/core/dataset/searchTest.ts +++ b/projects/app/src/pages/api/core/dataset/searchTest.ts @@ -98,7 +98,7 @@ async function handler(req: ApiRequestProps): Promise { description: t('dataset:common_dataset_desc'), onClick: () => onSelectDatasetType(DatasetTypeEnum.dataset) }, - { - icon: 'core/dataset/externalDatasetColor', - label: t('dataset:api_file'), - description: t('dataset:external_file_dataset_desc'), - onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset) - }, { icon: 'core/dataset/websiteDatasetColor', label: t('dataset:website_dataset'), description: t('dataset:website_dataset_desc'), onClick: () => onSelectDatasetType(DatasetTypeEnum.websiteDataset) + } + ] + }, + { + children: [ + { + icon: 'core/dataset/externalDatasetColor', + label: t('dataset:api_file'), + description: t('dataset:external_file_dataset_desc'), + onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset) }, { icon: 'core/dataset/feishuDatasetColor', diff --git a/projects/app/src/web/common/hooks/useSpeech.ts b/projects/app/src/web/common/hooks/useSpeech.ts index c5aac570f..65dffa70e 100644 --- a/projects/app/src/web/common/hooks/useSpeech.ts +++ b/projects/app/src/web/common/hooks/useSpeech.ts @@ -120,7 +120,7 @@ export const useSpeech = (props?: OutLinkChatAuthProps & { appId?: string }) => if (!navigator?.mediaDevices?.getUserMedia) { return toast({ status: 'warning', - title: t('common:speech.not support') + title: t('common:speech_not_support') }); } @@ -230,7 +230,7 @@ export const useSpeech = (props?: OutLinkChatAuthProps & { appId?: string }) => } catch (error) { toast({ status: 'warning', - title: getErrText(error, t('common:speech.error tip')) + title: getErrText(error, t('common:speech_error_tip')) }); } setIsTransCription(false);