mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00

* 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
19 lines
296 B
TypeScript
19 lines
296 B
TypeScript
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();
|
|
};
|