mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-27 02:08:10 +08:00
463b02d127
* perf: html2md * perf: index * Add model log * update next version * log index
12 lines
350 B
TypeScript
12 lines
350 B
TypeScript
import { WorkerNameEnum, runWorker } from '../../worker/utils';
|
|
import { type ImageType } from '../../worker/readFile/type';
|
|
|
|
export const htmlToMarkdown = async (html?: string | null) => {
|
|
const md = await runWorker<{
|
|
rawText: string;
|
|
imageList: ImageType[];
|
|
}>(WorkerNameEnum.htmlStr2Md, { html: html || '' });
|
|
|
|
return md.rawText;
|
|
};
|