Update docs and response tag in share page (#694)

* perf: chunk index show

* share response

* perf: vector query

* web printFinger

* remove log

* fix: bucket name

* perf: training schema

* perf: sort index
This commit is contained in:
Archer
2024-01-05 18:02:37 +08:00
committed by GitHub
parent 331d18c88f
commit 3f088bce6a
23 changed files with 242 additions and 181 deletions

View File

@@ -1,5 +1,10 @@
export enum BucketNameEnum {
dataset = 'dataset'
}
export const bucketNameMap = {
[BucketNameEnum.dataset]: {
label: 'common.file.bucket.dataset'
}
};
export const FileBaseUrl = '/api/common/file/read';

View File

@@ -20,13 +20,13 @@ export const readPdfFile = async ({ pdf }: { pdf: string | URL | ArrayBuffer })
const viewport = page.getViewport({ scale: 1 });
const pageHeight = viewport.height;
const headerThreshold = pageHeight * 0.07; // 假设页头在页面顶部5%的区域内
const footerThreshold = pageHeight * 0.93; // 假设页脚在页面底部5%的区域内
const headerThreshold = pageHeight * 0.95;
const footerThreshold = pageHeight * 0.05;
const pageTexts: TokenType[] = tokenizedText.items.filter((token: TokenType) => {
return (
!token.transform ||
(token.transform[5] > headerThreshold && token.transform[5] < footerThreshold)
(token.transform[5] < headerThreshold && token.transform[5] > footerThreshold)
);
});