feat: Text check before synchronization (#689)

* fix: icon

* fix: web selector

* fix: web selector

* perf: link sync

* dev doc

* chomd doc

* perf: git intro

* 466 intro

* intro img

* add json editor (#5)

* team limit

* websync limit

* json editor

* text editor

* perf: search test

* change cq value type

* doc

* intro img

---------

Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
Archer
2024-01-04 23:19:24 +08:00
committed by GitHub
parent c2abbb579f
commit 828829011a
64 changed files with 1789 additions and 1489 deletions

View File

@@ -12,4 +12,5 @@ export type UrlFetchParams = {
export type UrlFetchResponse = {
url: string;
content: string;
selector?: string;
}[];

View File

@@ -35,7 +35,7 @@ export function countPromptTokens(
const text = `${role}\n${prompt}`;
try {
const encodeText = enc.encode(text);
return encodeText.length + 3; // 补充 role 估算值
return encodeText.length + role.length; // 补充 role 估算值
} catch (error) {
return text.length;
}

View File

@@ -44,7 +44,8 @@ export type FastGPTFeConfigsType = {
google?: string;
};
limit?: {
exportLimitMinutes?: number;
exportDatasetLimitMinutes?: number;
websiteSyncLimitMinuted?: number;
};
scripts?: { [key: string]: string }[];
favicon?: string;