Files
FastGPT/packages/service/common/string/utils.ts
Archer 463b02d127 perf log (#6107)
* perf: html2md

* perf: index

* Add model log

* update next version

* log index
2025-12-17 17:44:38 +08:00

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;
};