mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 20:27:45 +00:00
perf: password special chars;feat: llm paragraph;perf: chunk setting params;perf: text splitter worker (#4984)
* perf: password special chars * feat: llm paragraph;perf: chunk setting params * perf: text splitter worker * perf: get rawtext buffer * fix: test * fix: test * doc * min chunk size
This commit is contained in:
18
packages/service/worker/controller.ts
Normal file
18
packages/service/worker/controller.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { MessagePort } from 'worker_threads';
|
||||
|
||||
export const workerResponse = ({
|
||||
parentPort,
|
||||
status,
|
||||
data
|
||||
}: {
|
||||
parentPort: MessagePort | null;
|
||||
status: 'success' | 'error';
|
||||
data: any;
|
||||
}) => {
|
||||
parentPort?.postMessage({
|
||||
type: status,
|
||||
data: data
|
||||
});
|
||||
|
||||
process.exit();
|
||||
};
|
Reference in New Issue
Block a user