Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
ef537f39
authored
May 06, 2025
by
Archer
Committed by
GitHub
May 06, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: rerank usage (#4751)
* remove invalid index * perf: i18n * fix: rerank usage
parent
367ee517
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
34 deletions
+38
-34
packages/global/support/wallet/bill/type.d.ts
+5
-0
packages/service/core/chat/chatItemSchema.ts
+0
-2
packages/web/components/common/Textarea/JsonEditor/index.tsx
+1
-1
packages/web/hooks/useCopyData.tsx
+1
-1
packages/web/i18n/en/common.json
+6
-7
packages/web/i18n/zh-CN/common.json
+6
-7
packages/web/i18n/zh-Hant/common.json
+6
-7
projects/app/src/pages/api/core/dataset/searchTest.ts
+1
-1
projects/app/src/pages/dataset/list/index.tsx
+10
-6
projects/app/src/web/common/hooks/useSpeech.ts
+2
-2
No files found.
packages/global/support/wallet/bill/type.d.ts
View file @
ef537f39
...
...
@@ -21,6 +21,11 @@ export type BillSchemaType = {
datasetSize
?:
number
;
extraPoints
?:
number
;
};
refundData
?:
{
amount
:
number
;
refundId
:
string
;
refundTime
:
Date
;
};
};
export
type
ChatNodeUsageType
=
{
...
...
packages/service/core/chat/chatItemSchema.ts
View file @
ef537f39
...
...
@@ -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
});
...
...
packages/web/components/common/Textarea/JsonEditor/index.tsx
View file @
ef537f39
...
...
@@ -178,7 +178,7 @@ const JSONEditor = ({
}
catch
(
error
)
{
toast
({
status
:
'warning'
,
title
:
t
(
'common:json
Editor.Parse
error'
)
title
:
t
(
'common:json
_parse_
error'
)
});
}
},
[
value
]);
...
...
packages/web/hooks/useCopyData.tsx
View file @
ef537f39
...
...
@@ -20,7 +20,7 @@ export const useCopyData = () => {
const
copyData
=
useCallback
(
async
(
data
:
string
,
title
:
string
|
null
|
undefined
=
t
(
'common:
Copy S
uccessful'
),
title
:
string
|
null
|
undefined
=
t
(
'common:
copy_s
uccessful'
),
duration
=
1000
)
=>
{
data
=
data
.
trim
();
...
...
packages/web/i18n/en/common.json
View file @
ef537f39
...
...
@@ -135,7 +135,7 @@
"comfirm_leave_page"
:
"Confirm to Leave This Page?"
,
"Continue_Adding"
:
"Continue adding"
,
"Copy"
:
"Copy"
,
"
Copy S
uccessful"
:
"Copied Successfully"
,
"
copy_s
uccessful"
:
"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..."
,
"json
Editor.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 C
hatbot"
:
"Help Chatbot"
,
"
system.Use H
elper"
:
"Use Helper"
,
"system
_help_c
hatbot"
:
"Help Chatbot"
,
"
use_h
elper"
:
"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"
,
...
...
packages/web/i18n/zh-CN/common.json
View file @
ef537f39
...
...
@@ -133,7 +133,7 @@
"comfirm_leave_page"
:
"确认离开该页面?"
,
"Continue_Adding"
:
"继续添加"
,
"Copy"
:
"复制"
,
"
Copy S
uccessful"
:
"复制成功"
,
"
copy_s
uccessful"
:
"复制成功"
,
"create_failed"
:
"创建异常"
,
"create_success"
:
"创建成功"
,
"create_time"
:
"创建时间"
,
...
...
@@ -239,7 +239,7 @@
"have_done"
:
"已完成"
,
"input.Repeat Value"
:
"有重复的值"
,
"is_requesting"
:
"请求中……"
,
"json
Editor.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 C
hatbot"
:
"机器人助手"
,
"
system.Use H
elper"
:
"使用帮助"
,
"system
_help_c
hatbot"
:
"机器人助手"
,
"
use_h
elper"
:
"使用帮助"
,
"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"
:
"未部署重排模型"
,
...
...
packages/web/i18n/zh-Hant/common.json
View file @
ef537f39
...
...
@@ -132,7 +132,7 @@
"comfirm_leave_page"
:
"確認離開此頁面?"
,
"Continue_Adding"
:
"繼續新增"
,
"Copy"
:
"複製"
,
"
Copy S
uccessful"
:
"複製成功"
,
"
copy_s
uccessful"
:
"複製成功"
,
"create_failed"
:
"建立失敗"
,
"create_success"
:
"建立成功"
,
"create_time"
:
"建立時間"
,
...
...
@@ -238,7 +238,7 @@
"have_done"
:
"已完成"
,
"input.Repeat Value"
:
"重複的值"
,
"is_requesting"
:
"請求中..."
,
"json
Editor.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 C
hatbot"
:
"機器人助手"
,
"
system.Use H
elper"
:
"使用說明"
,
"system
_help_c
hatbot"
:
"機器人助手"
,
"
use_h
elper"
:
"使用說明"
,
"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"
:
"未部署重新排名模型"
,
...
...
projects/app/src/pages/api/core/dataset/searchTest.ts
View file @
ef537f39
...
...
@@ -98,7 +98,7 @@ async function handler(req: ApiRequestProps<SearchTestProps>): Promise<SearchTes
const
{
totalPoints
:
embeddingTotalPoints
}
=
pushGenerateVectorUsage
({
teamId
,
tmbId
,
inputTokens
:
reRankInput
Tokens
,
inputTokens
:
embedding
Tokens
,
model
:
dataset
.
vectorModel
,
source
:
apikey
?
UsageSourceEnum
.
api
:
UsageSourceEnum
.
fastgpt
,
...
...
projects/app/src/pages/dataset/list/index.tsx
View file @
ef537f39
...
...
@@ -162,16 +162,20 @@ const Dataset = () => {
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'
,
...
...
projects/app/src/web/common/hooks/useSpeech.ts
View file @
ef537f39
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment